summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-04-04 01:27:53 +0000
committerJohn McCall <rjmccall@apple.com>2012-04-04 01:27:53 +0000
commit73f428cf2c5a0847014a3125b7bb8d271aaa7c65 (patch)
tree9d8382ec190e5c676f89ead62f8cd033b727fdb0 /test/CodeGenObjC
parent8e59838ed66eb8a853927a43fc25f974ee2ee838 (diff)
Enter an expression evaluation context when parsing
statement-expressions. Prevents cleanups and such from being claimed by the first full-expression in the block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r--test/CodeGenObjC/arc-blocks.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-blocks.m b/test/CodeGenObjC/arc-blocks.m
index bde5ec3747..06acf01ce0 100644
--- a/test/CodeGenObjC/arc-blocks.m
+++ b/test/CodeGenObjC/arc-blocks.m
@@ -514,3 +514,10 @@ void test13(id x) {
void test14() {
void (^const x[1])(void) = { ^{} };
}
+
+// rdar://11149025
+// Don't make invalid ASTs and crash.
+void test15_helper(void (^block)(void), int x);
+void test15(int a) {
+ test15_helper(^{ (void) a; }, ({ a; }));
+}