summaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/blocks-ivar-debug.m
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-10 17:24:58 +0000
committerDevang Patel <dpatel@apple.com>2010-05-10 17:24:58 +0000
commit258cf2766859f706bcd231a48593fbb6a1a1d0fe (patch)
tree0ea7ac0b6dab83cc5bf44960a767b84884bcacdf /test/CodeGenObjC/blocks-ivar-debug.m
parent90556d43dc697a675eda81ed80f2f585662bca4d (diff)
downloadclang-258cf2766859f706bcd231a48593fbb6a1a1d0fe.tar.gz
If variable location is invalid then use current location.
This fixes radar 7959934. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/blocks-ivar-debug.m')
-rw-r--r--test/CodeGenObjC/blocks-ivar-debug.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenObjC/blocks-ivar-debug.m b/test/CodeGenObjC/blocks-ivar-debug.m
new file mode 100644
index 0000000000..92a5a72d42
--- /dev/null
+++ b/test/CodeGenObjC/blocks-ivar-debug.m
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -g %s -fblocks -S -o /dev/null
+// Radar 7959934
+
+@interface NSObject {
+ struct objc_object *isa;
+}
+@end
+@interface Foo : NSObject {
+ int _prop;
+}
+@end
+
+@implementation Foo
+- (int)doSomething {
+ int (^blk)(void) = ^{ return _prop; };
+ return blk();
+}
+
+@end
+