summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/2007-04-03-ObjcEH.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenObjC/2007-04-03-ObjcEH.m')
-rw-r--r--clang/test/CodeGenObjC/2007-04-03-ObjcEH.m27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/2007-04-03-ObjcEH.m b/clang/test/CodeGenObjC/2007-04-03-ObjcEH.m
new file mode 100644
index 0000000..f86ff49
--- /dev/null
+++ b/clang/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