summaryrefslogtreecommitdiff
path: root/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
blob: 7bfb655db99b4022102658863dcb91b2ae70aee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -verify %s

struct S; // expected-note {{forward declaration of 'struct S'}}
extern S a;
extern S f(); // expected-note {{'f' declared here}}
extern void g(S a); // expected-note {{candidate function}}

void h() {
  // FIXME: This diagnostic could be better.
  g(a); // expected-error {{no matching function for call to 'g'}}
  f(); // expected-error {{calling 'f' with incomplete return type 'struct S'}}
}