diff options
Diffstat (limited to 'test/CXX/dcl.dcl/dcl.spec')
-rw-r--r-- | test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp | 10 | ||||
-rw-r--r-- | test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp index 99a4f7a..d7b9eff 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp @@ -1,11 +1,13 @@ // RUN: %clang_cc1 -verify %s -// XFAIL: * -void f0(void) { - inline void f1(); // expected-error {{'inline' is not allowed on block scope function declaration}} +void f0a(void) { + inline void f1(); // expected-error {{inline declaration of 'f1' not allowed in block scope}} +} + +void f0b(void) { + void f1(); } // FIXME: Add test for "If the inline specifier is used in a friend declaration, // that declaration shall be a definition or the function shall have previously // been declared inline. - diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp index f507eec..491ab17 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp @@ -1,12 +1,11 @@ // RUN: %clang_cc1 -verify %s -struct S; // expected-note {{forward declaration of 'S'}} +struct S; // expected-note 2{{forward declaration of 'S'}} extern S a; extern S f(); // expected-note {{'f' declared here}} -extern void g(S a); // expected-note {{candidate function}} +extern void g(S a); void h() { - // FIXME: This diagnostic could be better. - g(a); // expected-error {{no matching function for call to 'g'}} + g(a); // expected-error {{argument type 'S' is incomplete}} f(); // expected-error {{calling 'f' with incomplete return type 'S'}} } |