aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/2007-04-03-ObjcEH.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/2007-04-03-ObjcEH.m')
-rw-r--r--test/CodeGenObjC/2007-04-03-ObjcEH.m27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGenObjC/2007-04-03-ObjcEH.m b/test/CodeGenObjC/2007-04-03-ObjcEH.m
new file mode 100644
index 000000000000..f86ff49bbbd5
--- /dev/null
+++ b/test/CodeGenObjC/2007-04-03-ObjcEH.m
@@ -0,0 +1,27 @@
+// RUN: %clang -fexceptions -S -emit-llvm %s -o -
+
+@interface B
+-(int)bar;
+@end
+
+@interface A
+-(void) Foo:(int) state;
+@end
+
+@implementation A
+- (void) Foo:(int) state {
+
+ int wasResponded = 0;
+ @try {
+ if (state) {
+ B * b = 0;
+ @try { }
+ @finally {
+ wasResponded = ![b bar];
+ }
+ }
+ }
+ @finally {
+ }
+}
+@end