aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/conflict-nonfragile-abi2.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/conflict-nonfragile-abi2.m')
-rw-r--r--test/SemaObjC/conflict-nonfragile-abi2.m34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/SemaObjC/conflict-nonfragile-abi2.m b/test/SemaObjC/conflict-nonfragile-abi2.m
new file mode 100644
index 000000000000..e4b513f75312
--- /dev/null
+++ b/test/SemaObjC/conflict-nonfragile-abi2.m
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s
+// rdar : // 8225011
+
+int glob; // expected-note {{global variable declared here}}
+
+@interface I
+@property int glob; // expected-note {{property declared here}}
+@property int p;
+@property int le;
+@property int l;
+@property int ls;
+@property int r;
+@end
+
+@implementation I
+- (int) Meth { return glob; } // expected-warning {{when default property synthesis is on, 'glob' lookup will access}}
+@synthesize glob;
+// rdar: // 8248681
+- (int) Meth1: (int) p {
+ extern int le;
+ int l = 1;
+ static int ls;
+ register int r;
+ p = le + ls + r;
+ return l;
+}
+@dynamic p;
+@dynamic le;
+@dynamic l;
+@dynamic ls;
+@dynamic r;
+@end
+
+