diff options
Diffstat (limited to 'test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp')
-rw-r--r-- | test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp new file mode 100644 index 000000000000..5d9f9e7a51c5 --- /dev/null +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp @@ -0,0 +1,12 @@ +// RUN: clang-cc -verify %s + +struct S; // expected-note {{forward declaration of 'struct S'}} +extern S a; +extern S f(); +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 {{return type of called function ('struct S') is incomplete}} +} |