summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenObjCXX/exceptions.mm18
1 files changed, 17 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjCXX/exceptions.mm b/clang/test/CodeGenObjCXX/exceptions.mm
index ce6d20aa98b..b3f73b1f9d5 100644
--- a/clang/test/CodeGenObjCXX/exceptions.mm
+++ b/clang/test/CodeGenObjCXX/exceptions.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - %s | FileCheck %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
@interface OCType @end
void opaque();
@@ -16,3 +16,19 @@ namespace test0 {
}
}
}
+
+// rdar://12605907
+@interface NSException
+ - new;
+@end
+namespace test1 {
+
+ void bar() {
+ @try {
+ throw [NSException new];
+ } @catch (id i) {
+ }
+ }
+// CHECK: invoke void @objc_exception_throw(i8* [[CALL:%.*]]) noreturn
+// CHECK: to label [[INVOKECONT1:%.*]] unwind label [[LPAD:%.*]]
+}
OpenPOWER on IntegriCloud