aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-07-22 23:33:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-07-22 23:33:21 +0000
commit69d5624644dad6b5117f8fee8fc4b09427861367 (patch)
tree9f34c77bc6ea823d88c7a9da0bb6e828ea681cdb /test
parentb92caa5aa6f428ab1bf1a71bea5a35e15c309d8c (diff)
Warn when property ivar lookup finds a global variable
of same name. In nonfragile-abi2, lookup accesses a synthesized ivar. This is a transition warning. Radar 8225011. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/SemaObjC/conflict-nonfragile-abi2.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaObjC/conflict-nonfragile-abi2.m b/test/SemaObjC/conflict-nonfragile-abi2.m
new file mode 100644
index 0000000000..49cff97ccb
--- /dev/null
+++ b/test/SemaObjC/conflict-nonfragile-abi2.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s
+// rdar : // 8225011
+
+int glob;
+
+@interface I
+@property int glob; // expected-note {{property declared here}}
+@end
+
+@implementation I
+- (int) Meth { return glob; } // expected-warning {{'glob' lookup will access the property ivar in nonfragile-abi2 mode}}
+@synthesize glob;
+@end