1*f4a2713aSLionel Sambuc@interface A 2*f4a2713aSLionel Sambuc@property (strong, nonatomic) id property; 3*f4a2713aSLionel Sambuc@property (nonatomic, weak) id second_property; 4*f4a2713aSLionel Sambuc@property (unsafe_unretained, nonatomic) id third_property; 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambucvoid foo() { 8*f4a2713aSLionel Sambuc A *avar; 9*f4a2713aSLionel Sambuc avar = 0; 10*f4a2713aSLionel Sambuc} 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc// RUN: c-index-test -test-annotate-tokens=%s:1:1:11:1 %s -fobjc-arc -fobjc-nonfragile-abi | FileCheck %s 13*f4a2713aSLionel Sambuc// CHECK: Punctuation: "@" [1:1 - 1:2] ObjCInterfaceDecl=A:1:12 14*f4a2713aSLionel Sambuc// CHECK: Keyword: "interface" [1:2 - 1:11] ObjCInterfaceDecl=A:1:12 15*f4a2713aSLionel Sambuc// CHECK: Identifier: "A" [1:12 - 1:13] ObjCInterfaceDecl=A:1:12 16*f4a2713aSLionel Sambuc// CHECK: Punctuation: "@" [2:1 - 2:2] ObjCPropertyDecl=property:2:34 17*f4a2713aSLionel Sambuc// CHECK: Keyword: "property" [2:2 - 2:10] ObjCPropertyDecl=property:2:34 18*f4a2713aSLionel Sambuc// CHECK: Punctuation: "(" [2:11 - 2:12] ObjCPropertyDecl=property:2:34 19*f4a2713aSLionel Sambuc// CHECK: Keyword: "strong" [2:12 - 2:18] ObjCPropertyDecl=property:2:34 20*f4a2713aSLionel Sambuc// CHECK: Punctuation: "," [2:18 - 2:19] ObjCPropertyDecl=property:2:34 21*f4a2713aSLionel Sambuc// CHECK: Keyword: "nonatomic" [2:20 - 2:29] ObjCPropertyDecl=property:2:34 22*f4a2713aSLionel Sambuc// CHECK: Punctuation: ")" [2:29 - 2:30] ObjCPropertyDecl=property:2:34 23*f4a2713aSLionel Sambuc// CHECK: Identifier: "id" [2:31 - 2:33] TypeRef=id:0:0 24*f4a2713aSLionel Sambuc// CHECK: Identifier: "property" [2:34 - 2:42] ObjCPropertyDecl=property:2:34 25*f4a2713aSLionel Sambuc// CHECK: Punctuation: ";" [2:42 - 2:43] ObjCInterfaceDecl=A:1:12 26*f4a2713aSLionel Sambuc// CHECK: Punctuation: "@" [3:1 - 3:2] ObjCPropertyDecl=second_property:3:32 27*f4a2713aSLionel Sambuc// CHECK: Keyword: "property" [3:2 - 3:10] ObjCPropertyDecl=second_property:3:32 28*f4a2713aSLionel Sambuc// CHECK: Punctuation: "(" [3:11 - 3:12] ObjCPropertyDecl=second_property:3:32 29*f4a2713aSLionel Sambuc// CHECK: Keyword: "nonatomic" [3:12 - 3:21] ObjCPropertyDecl=second_property:3:32 30*f4a2713aSLionel Sambuc// CHECK: Punctuation: "," [3:21 - 3:22] ObjCPropertyDecl=second_property:3:32 31*f4a2713aSLionel Sambuc// CHECK: Keyword: "weak" [3:23 - 3:27] ObjCPropertyDecl=second_property:3:32 32*f4a2713aSLionel Sambuc// CHECK: Punctuation: ")" [3:27 - 3:28] ObjCPropertyDecl=second_property:3:32 33*f4a2713aSLionel Sambuc// CHECK: Identifier: "id" [3:29 - 3:31] TypeRef=id:0:0 34*f4a2713aSLionel Sambuc// CHECK: Identifier: "second_property" [3:32 - 3:47] ObjCPropertyDecl=second_property:3:32 35*f4a2713aSLionel Sambuc// CHECK: Punctuation: "@" [4:1 - 4:2] ObjCPropertyDecl=third_property:4:45 36*f4a2713aSLionel Sambuc// CHECK: Keyword: "property" [4:2 - 4:10] ObjCPropertyDecl=third_property:4:45 37*f4a2713aSLionel Sambuc// CHECK: Punctuation: "(" [4:11 - 4:12] ObjCPropertyDecl=third_property:4:45 38*f4a2713aSLionel Sambuc// CHECK: Keyword: "unsafe_unretained" [4:12 - 4:29] ObjCPropertyDecl=third_property:4:45 39*f4a2713aSLionel Sambuc// CHECK: Punctuation: "," [4:29 - 4:30] ObjCPropertyDecl=third_property:4:45 40*f4a2713aSLionel Sambuc// CHECK: Keyword: "nonatomic" [4:31 - 4:40] ObjCPropertyDecl=third_property:4:45 41*f4a2713aSLionel Sambuc// CHECK: Punctuation: ")" [4:40 - 4:41] ObjCPropertyDecl=third_property:4:45 42*f4a2713aSLionel Sambuc// CHECK: Identifier: "id" [4:42 - 4:44] TypeRef=id:0:0 43*f4a2713aSLionel Sambuc// CHECK: Identifier: "third_property" [4:45 - 4:59] ObjCPropertyDecl=third_property:4:45 44*f4a2713aSLionel Sambuc 45*f4a2713aSLionel Sambuc// CHECK: Identifier: "A" [8:3 - 8:4] ObjCClassRef=A:1:12 46*f4a2713aSLionel Sambuc// CHECK: Punctuation: "*" [8:5 - 8:6] VarDecl=avar:8:6 (Definition) 47*f4a2713aSLionel Sambuc// CHECK: Identifier: "avar" [8:6 - 8:10] VarDecl=avar:8:6 (Definition) 48*f4a2713aSLionel Sambuc// CHECK: Punctuation: ";" [8:10 - 8:11] DeclStmt= 49*f4a2713aSLionel Sambuc// CHECK: Identifier: "avar" [9:3 - 9:7] DeclRefExpr=avar:8:6 50*f4a2713aSLionel Sambuc// CHECK: Punctuation: "=" [9:8 - 9:9] BinaryOperator= 51*f4a2713aSLionel Sambuc// CHECK: Literal: "0" [9:10 - 9:11] IntegerLiteral= 52*f4a2713aSLionel Sambuc// CHECK: Punctuation: ";" [9:11 - 9:12] CompoundStmt= 53*f4a2713aSLionel Sambuc 54*f4a2713aSLionel Sambuc// RUN: c-index-test -file-refs-at=%s:8:8 %s -fobjc-arc -fobjc-nonfragile-abi | FileCheck %s -check-prefix=CHECK-REFS 55*f4a2713aSLionel Sambuc// CHECK-REFS: VarDecl=avar:8:6 (Definition) 56*f4a2713aSLionel Sambuc// CHECK-REFS: VarDecl=avar:8:6 (Definition) =[8:6 - 8:10] 57*f4a2713aSLionel Sambuc// CHECK-REFS: DeclRefExpr=avar:8:6 =[9:3 - 9:7] 58