diff options
Diffstat (limited to 'test/CXX/except')
-rw-r--r-- | test/CXX/except/except.spec/p14-ir.cpp | 12 | ||||
-rw-r--r-- | test/CXX/except/except.spec/p14.cpp | 11 | ||||
-rw-r--r-- | test/CXX/except/except.spec/p9-noexcept.cpp | 7 |
3 files changed, 23 insertions, 7 deletions
diff --git a/test/CXX/except/except.spec/p14-ir.cpp b/test/CXX/except/except.spec/p14-ir.cpp index 81fbf7d..9b41f3d 100644 --- a/test/CXX/except/except.spec/p14-ir.cpp +++ b/test/CXX/except/except.spec/p14-ir.cpp @@ -27,12 +27,12 @@ struct X5 : X0, X4 { }; void test(X2 x2, X3 x3, X5 x5) { // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2*) unnamed_addr - // CHECK: call void @_ZN2X2C2ERKS_({{.*}}) nounwind + // CHECK: call void @_ZN2X2C2ERKS_({{.*}}) [[NUW:#[0-9]+]] // CHECK-NEXT: ret void // CHECK-NEXT: } X2 x2a(x2); // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3*) unnamed_addr - // CHECK: call void @_ZN2X3C2ERKS_({{.*}}) nounwind + // CHECK: call void @_ZN2X3C2ERKS_({{.*}}) [[NUW]] // CHECK-NEXT: ret void // CHECK-NEXT: } X3 x3a(x3); @@ -56,7 +56,7 @@ struct X9 : X6, X7 { }; void test() { // CHECK: define linkonce_odr void @_ZN2X8C1Ev(%struct.X8* %this) unnamed_addr - // CHECK: call void @_ZN2X8C2Ev({{.*}}) nounwind + // CHECK: call void @_ZN2X8C2Ev({{.*}}) [[NUW]] // CHECK-NEXT: ret void X8(); @@ -67,13 +67,15 @@ void test() { X9(); // CHECK: define linkonce_odr void @_ZN2X9C2Ev(%struct.X9* %this) unnamed_addr - // CHECK: call void @_ZN2X6C2Ev({{.*}}) nounwind + // CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]] // FIXME: and here: // CHECK-NEXT: bitcast // CHECK-NEXT: call void @_ZN2X7C2Ev({{.*}}) // CHECK: ret void // CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X8* %this) unnamed_addr - // CHECK: call void @_ZN2X6C2Ev({{.*}}) nounwind + // CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]] // CHECK-NEXT: ret void } + +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CXX/except/except.spec/p14.cpp b/test/CXX/except/except.spec/p14.cpp index ff21ab8..99ed2fd 100644 --- a/test/CXX/except/except.spec/p14.cpp +++ b/test/CXX/except/except.spec/p14.cpp @@ -101,3 +101,14 @@ namespace PR14141 { ~Derived3() noexcept(true) = default; // expected-error {{does not match the calculated}} }; } + +namespace rdar13017229 { + struct Base { + virtual ~Base() {} + }; + + struct Derived : Base { + virtual ~Derived(); + Typo foo(); // expected-error{{unknown type name 'Typo'}} + }; +} diff --git a/test/CXX/except/except.spec/p9-noexcept.cpp b/test/CXX/except/except.spec/p9-noexcept.cpp index 7c8d0ef..3fd45c5 100644 --- a/test/CXX/except/except.spec/p9-noexcept.cpp +++ b/test/CXX/except/except.spec/p9-noexcept.cpp @@ -7,9 +7,10 @@ void target() noexcept // CHECK: invoke void @_Z8externalv() external(); } -// CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) +// CHECK: [[T0:%.*]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) // CHECK-NEXT: catch i8* null -// CHECK-NEXT: call void @_ZSt9terminatev() noreturn nounwind +// CHECK-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0 +// CHECK-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]] // CHECK-NEXT: unreachable void reverse() noexcept(false) @@ -17,3 +18,5 @@ void reverse() noexcept(false) // CHECK: call void @_Z8externalv() external(); } + +// CHECK: attributes [[NR_NUW]] = { noreturn nounwind } |