summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC/arc-compound-stmt.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/arc-compound-stmt.m')
-rw-r--r--test/CodeGenObjC/arc-compound-stmt.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-compound-stmt.m b/test/CodeGenObjC/arc-compound-stmt.m
new file mode 100644
index 0000000..946d72f
--- /dev/null
+++ b/test/CodeGenObjC/arc-compound-stmt.m
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -fobjc-arc -o - %s
+// rdar://9694706
+
+typedef unsigned long NSUInteger;
+
+@interface NSString
+- (NSString *)stringByAppendingString:(NSString *)aString;
+- (NSString *)substringFromIndex:(NSUInteger)from;
+@end
+
+@interface MyClass
+- (void)inst;
+@end
+
+@implementation MyClass
+
+- (void)inst;
+{
+ NSString *propName;
+
+ NSString *capitalPropName = ({
+ NSString *cap;
+ if (propName)
+ cap = [cap stringByAppendingString:[propName substringFromIndex:1]];
+ cap;
+ });
+}
+
+@end
OpenPOWER on IntegriCloud