summaryrefslogtreecommitdiffstats
path: root/test/Index/index-decls.m
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-29 23:58:31 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-29 23:58:31 +0000
commit1bc085aec3901e22b819bb6761d5ccc360194604 (patch)
treefd57a0e9c636ec01ad1e54bf50c2beb1aaff36b5 /test/Index/index-decls.m
parenta0ed171ad5d111df92ae296b10549acfc67a9e2d (diff)
[libclang] When indexing a @synthesize, don't consider that it defines a getter/setter if one is already defined by the user.
Fixes rdar://13925258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/index-decls.m')
-rw-r--r--test/Index/index-decls.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Index/index-decls.m b/test/Index/index-decls.m
index c6b14bb8fd..a405abc78c 100644
--- a/test/Index/index-decls.m
+++ b/test/Index/index-decls.m
@@ -33,6 +33,21 @@ int test1() {
return extfn();
}
+@interface I4
+@property (assign, nonatomic) id prop;
+-(id)prop;
+-(void)setProp:(id)p;
+@end
+
+@implementation I4
+@synthesize prop = _prop;
+-(id)prop {
+ return 0;
+}
+-(void)setProp:(id)p {
+}
+@end
+
// RUN: c-index-test -index-file %s -target x86_64-apple-macosx10.7 > %t
// RUN: FileCheck %s -input-file=%t
// CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12
@@ -54,3 +69,7 @@ int test1() {
// CHECK: [indexEntityReference]: kind: variable | name: extvar | {{.*}} | loc: 31:3
// CHECK: [indexDeclaration]: kind: function | name: extfn | {{.*}} | loc: 32:14
// CHECK: [indexEntityReference]: kind: function | name: extfn | {{.*}} | loc: 33:10
+
+// CHECK: [indexDeclaration]: kind: objc-class | name: I4 | {{.*}} | loc: 36:12
+// CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 37:
+// CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 43: