diff options
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r-- | test/Parser/cxx-class.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp index 5fac797..80cd828 100644 --- a/test/Parser/cxx-class.cpp +++ b/test/Parser/cxx-class.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -fcxx-exceptions %s class C; class C { public: @@ -113,6 +113,32 @@ namespace PR13775 { } } +class pr16989 { + void tpl_mem(int *) { + return; + class C2 { + void f(); + }; + void C2::f() {} // expected-error{{function definition is not allowed here}} + }; +}; + +namespace CtorErrors { + struct A { + A(NonExistent); // expected-error {{unknown type name 'NonExistent'}} + }; + struct B { + B(NonExistent) : n(0) {} // expected-error {{unknown type name 'NonExistent'}} + int n; + }; + struct C { + C(NonExistent) try {} catch (...) {} // expected-error {{unknown type name 'NonExistent'}} + }; + struct D { + D(NonExistent) {} // expected-error {{unknown type name 'NonExistent'}} + }; +} + // PR11109 must appear at the end of the source file class pr11109r3 { // expected-note{{to match this '{'}} public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}} |