summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
committerdim <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
commit173a4f43a911175643bda81ee675e8d9269056ea (patch)
tree47df2c12b57214af6c31e47404b005675b8b7ffc /test/Parser/cxx-class.cpp
parent88f7a7d5251a2d813460274c92decc143a11569b (diff)
downloadFreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip
FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r--test/Parser/cxx-class.cpp28
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}}
OpenPOWER on IntegriCloud