Douglas Gregor | 98146a6 | 2010-03-09 13:06:04 +0000 | [diff] [blame] | 1 | @interface Foo |
| 2 | - (int)compare:(Foo*)other; |
| 3 | @end |
| 4 | |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 5 | @implementation Foo |
| 6 | - (int)compare:(Foo*)other { |
| 7 | return 0; |
Douglas Gregor | 81d3466 | 2010-04-20 15:39:42 +0000 | [diff] [blame] | 8 | (void)@encode(Foo); |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 9 | } |
| 10 | @end |
| 11 | |
Ted Kremenek | a333c66 | 2010-05-12 05:29:33 +0000 | [diff] [blame] | 12 | // From <rdar://problem/7971430>, the 'barType' referenced in the ivar |
| 13 | // declarations should be annotated as TypeRefs. |
| 14 | typedef int * barType; |
| 15 | @interface Bar |
| 16 | { |
| 17 | barType iVar; |
| 18 | barType iVar1, iVar2; |
| 19 | } |
| 20 | @end |
| 21 | @implementation Bar |
| 22 | - (void) method |
| 23 | { |
| 24 | barType local = iVar; |
| 25 | } |
| 26 | @end |
| 27 | |
Ted Kremenek | 9a700d2 | 2010-05-12 06:16:13 +0000 | [diff] [blame] | 28 | // From <rdar://problem/7967123>. The ranges for attributes are not |
| 29 | // currently stored, causing most of the tokens to be falsely annotated. |
| 30 | // Since there are no source ranges for attributes, we currently don't |
| 31 | // annotate them. |
| 32 | @interface IBActionTests |
| 33 | - (IBAction) actionMethod:(id)arg; |
| 34 | - (void)foo:(int)x; |
| 35 | @end |
| 36 | extern int ibaction_test(void); |
| 37 | @implementation IBActionTests |
| 38 | - (IBAction) actionMethod:(id)arg |
| 39 | { |
| 40 | ibaction_test(); |
| 41 | [self foo:0]; |
| 42 | } |
| 43 | - (void) foo:(int)x |
| 44 | { |
| 45 | (void) x; |
| 46 | } |
| 47 | @end |
| 48 | |
| 49 | // From <rdar://problem/7961995>. Essentially the same issue as 7967123, |
| 50 | // but impacting code marked as IBOutlets. |
| 51 | @interface IBOutletTests |
| 52 | { |
| 53 | IBOutlet char * anOutlet; |
| 54 | } |
| 55 | - (IBAction) actionMethod:(id)arg; |
| 56 | @property IBOutlet int * aPropOutlet; |
| 57 | @end |
| 58 | |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 59 | // From <rdar://problem/7974151>. The first 'foo:' wasn't being annotated as |
| 60 | // being part of the Objective-C message expression since the argument |
| 61 | // was expanded from a macro. |
| 62 | |
| 63 | #define VAL 0 |
| 64 | |
| 65 | @interface R7974151 |
| 66 | - (int) foo:(int)arg; |
| 67 | - (int) method; |
| 68 | @end |
| 69 | |
| 70 | @implementation R7974151 |
| 71 | - (int) foo:(int)arg { |
| 72 | return arg; |
| 73 | } |
| 74 | - (int) method |
| 75 | { |
| 76 | int local = [self foo:VAL]; |
| 77 | int second = [self foo:0]; |
| 78 | return local; |
| 79 | } |
Douglas Gregor | db1314e | 2010-10-01 21:11:22 +0000 | [diff] [blame] | 80 | - (int)othermethod:(IBOutletTests *)ibt { |
| 81 | return *ibt.aPropOutlet; |
| 82 | } |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 83 | @end |
| 84 | |
Douglas Gregor | db1314e | 2010-10-01 21:11:22 +0000 | [diff] [blame] | 85 | @protocol Proto @end |
| 86 | |
| 87 | void f() { |
| 88 | (void)@protocol(Proto); |
| 89 | } |
| 90 | |
| 91 | // RUN: c-index-test -test-annotate-tokens=%s:1:1:89:2 %s -DIBOutlet='__attribute__((iboutlet))' -DIBAction='void)__attribute__((ibaction)' | FileCheck %s |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 92 | // CHECK: Punctuation: "@" [1:1 - 1:2] ObjCInterfaceDecl=Foo:1:12 |
| 93 | // CHECK: Keyword: "interface" [1:2 - 1:11] ObjCInterfaceDecl=Foo:1:12 |
Douglas Gregor | 98146a6 | 2010-03-09 13:06:04 +0000 | [diff] [blame] | 94 | // CHECK: Identifier: "Foo" [1:12 - 1:15] ObjCInterfaceDecl=Foo:1:12 |
| 95 | // CHECK: Punctuation: "-" [2:1 - 2:2] ObjCInstanceMethodDecl=compare::2:1 |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 96 | // CHECK: Punctuation: "(" [2:3 - 2:4] ObjCInstanceMethodDecl=compare::2:1 |
| 97 | // CHECK: Keyword: "int" [2:4 - 2:7] ObjCInstanceMethodDecl=compare::2:1 |
| 98 | // CHECK: Punctuation: ")" [2:7 - 2:8] ObjCInstanceMethodDecl=compare::2:1 |
| 99 | // CHECK: Identifier: "compare" [2:8 - 2:15] ObjCInstanceMethodDecl=compare::2:1 |
| 100 | // CHECK: Punctuation: ":" [2:15 - 2:16] ObjCInstanceMethodDecl=compare::2:1 |
| 101 | // CHECK: Punctuation: "(" [2:16 - 2:17] ObjCInstanceMethodDecl=compare::2:1 |
Douglas Gregor | 98146a6 | 2010-03-09 13:06:04 +0000 | [diff] [blame] | 102 | // CHECK: Identifier: "Foo" [2:17 - 2:20] ObjCClassRef=Foo:1:12 |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 103 | // CHECK: Punctuation: "*" [2:20 - 2:21] ParmDecl=other:2:22 (Definition) |
| 104 | // CHECK: Punctuation: ")" [2:21 - 2:22] ParmDecl=other:2:22 (Definition) |
Douglas Gregor | 98146a6 | 2010-03-09 13:06:04 +0000 | [diff] [blame] | 105 | // CHECK: Identifier: "other" [2:22 - 2:27] ParmDecl=other:2:22 (Definition) |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 106 | // CHECK: Punctuation: ";" [2:27 - 2:28] ObjCInstanceMethodDecl=compare::2:1 |
| 107 | // CHECK: Punctuation: "@" [3:1 - 3:2] ObjCInterfaceDecl=Foo:1:12 |
| 108 | // CHECK: Keyword: "end" [3:2 - 3:5] ObjCInterfaceDecl=Foo:1:12 |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 109 | // CHECK: Punctuation: "@" [5:1 - 5:2] ObjCImplementationDecl=Foo:5:1 (Definition) |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 110 | // CHECK: Keyword: "implementation" [5:2 - 5:16] ObjCImplementationDecl=Foo:5:1 (Definition) |
| 111 | // CHECK: Identifier: "Foo" [5:17 - 5:20] ObjCImplementationDecl=Foo:5:1 (Definition) |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 112 | // CHECK: Punctuation: "-" [6:1 - 6:2] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 113 | // CHECK: Punctuation: "(" [6:3 - 6:4] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
| 114 | // CHECK: Keyword: "int" [6:4 - 6:7] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
| 115 | // CHECK: Punctuation: ")" [6:7 - 6:8] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
| 116 | // CHECK: Identifier: "compare" [6:8 - 6:15] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
| 117 | // CHECK: Punctuation: ":" [6:15 - 6:16] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
| 118 | // CHECK: Punctuation: "(" [6:16 - 6:17] ObjCInstanceMethodDecl=compare::6:1 (Definition) |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 119 | // CHECK: Identifier: "Foo" [6:17 - 6:20] ObjCClassRef=Foo:1:12 |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 120 | // CHECK: Punctuation: "*" [6:20 - 6:21] ParmDecl=other:6:22 (Definition) |
| 121 | // CHECK: Punctuation: ")" [6:21 - 6:22] ParmDecl=other:6:22 (Definition) |
Douglas Gregor | e0610a4 | 2010-03-09 20:57:01 +0000 | [diff] [blame] | 122 | // CHECK: Identifier: "other" [6:22 - 6:27] ParmDecl=other:6:22 (Definition) |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 123 | // CHECK: Punctuation: "{" [6:28 - 6:29] UnexposedStmt= |
| 124 | // CHECK: Keyword: "return" [7:3 - 7:9] UnexposedStmt= |
| 125 | // CHECK: Literal: "0" [7:10 - 7:11] UnexposedExpr= |
| 126 | // CHECK: Punctuation: ";" [7:11 - 7:12] UnexposedStmt= |
| 127 | // CHECK: Punctuation: "(" [8:3 - 8:4] UnexposedExpr= |
| 128 | // CHECK: Keyword: "void" [8:4 - 8:8] UnexposedExpr= |
| 129 | // CHECK: Punctuation: ")" [8:8 - 8:9] UnexposedExpr= |
| 130 | // CHECK: Punctuation: "@" [8:9 - 8:10] UnexposedExpr= |
| 131 | // CHECK: Keyword: "encode" [8:10 - 8:16] UnexposedExpr= |
| 132 | // CHECK: Punctuation: "(" [8:16 - 8:17] UnexposedExpr= |
Douglas Gregor | 81d3466 | 2010-04-20 15:39:42 +0000 | [diff] [blame] | 133 | // CHECK: Identifier: "Foo" [8:17 - 8:20] ObjCClassRef=Foo:1:12 |
Ted Kremenek | fbd84ca | 2010-05-05 00:55:23 +0000 | [diff] [blame] | 134 | // CHECK: Punctuation: ")" [8:20 - 8:21] UnexposedExpr= |
| 135 | // CHECK: Punctuation: ";" [8:21 - 8:22] UnexposedStmt= |
| 136 | // CHECK: Punctuation: "}" [9:1 - 9:2] UnexposedStmt= |
| 137 | // CHECK: Punctuation: "@" [10:1 - 10:2] ObjCImplementationDecl=Foo:5:1 (Definition) |
| 138 | // CHECK: Keyword: "end" [10:2 - 10:5] |
Ted Kremenek | a333c66 | 2010-05-12 05:29:33 +0000 | [diff] [blame] | 139 | // CHECK: Keyword: "typedef" [14:1 - 14:8] |
| 140 | // CHECK: Keyword: "int" [14:9 - 14:12] |
| 141 | // CHECK: Punctuation: "*" [14:13 - 14:14] |
| 142 | // CHECK: Identifier: "barType" [14:15 - 14:22] TypedefDecl=barType:14:15 (Definition) |
| 143 | // CHECK: Punctuation: ";" [14:22 - 14:23] |
| 144 | // CHECK: Punctuation: "@" [15:1 - 15:2] ObjCInterfaceDecl=Bar:15:12 |
| 145 | // CHECK: Keyword: "interface" [15:2 - 15:11] ObjCInterfaceDecl=Bar:15:12 |
| 146 | // CHECK: Identifier: "Bar" [15:12 - 15:15] ObjCInterfaceDecl=Bar:15:12 |
| 147 | // CHECK: Punctuation: "{" [16:1 - 16:2] ObjCInterfaceDecl=Bar:15:12 |
| 148 | // CHECK: Identifier: "barType" [17:5 - 17:12] TypeRef=barType:14:15 |
| 149 | // CHECK: Identifier: "iVar" [17:13 - 17:17] ObjCIvarDecl=iVar:17:13 (Definition) |
| 150 | // CHECK: Punctuation: ";" [17:17 - 17:18] ObjCInterfaceDecl=Bar:15:12 |
| 151 | // CHECK: Identifier: "barType" [18:5 - 18:12] TypeRef=barType:14:15 |
| 152 | // CHECK: Identifier: "iVar1" [18:13 - 18:18] ObjCIvarDecl=iVar1:18:13 (Definition) |
| 153 | // CHECK: Punctuation: "," [18:18 - 18:19] ObjCIvarDecl=iVar2:18:20 (Definition) |
| 154 | // CHECK: Identifier: "iVar2" [18:20 - 18:25] ObjCIvarDecl=iVar2:18:20 (Definition) |
| 155 | // CHECK: Punctuation: ";" [18:25 - 18:26] ObjCInterfaceDecl=Bar:15:12 |
| 156 | // CHECK: Punctuation: "}" [19:1 - 19:2] ObjCInterfaceDecl=Bar:15:12 |
| 157 | // CHECK: Punctuation: "@" [20:1 - 20:2] ObjCInterfaceDecl=Bar:15:12 |
| 158 | // CHECK: Keyword: "end" [20:2 - 20:5] ObjCInterfaceDecl=Bar:15:12 |
| 159 | // CHECK: Punctuation: "@" [21:1 - 21:2] ObjCImplementationDecl=Bar:21:1 (Definition) |
| 160 | // CHECK: Keyword: "implementation" [21:2 - 21:16] ObjCImplementationDecl=Bar:21:1 (Definition) |
| 161 | // CHECK: Identifier: "Bar" [21:17 - 21:20] ObjCImplementationDecl=Bar:21:1 (Definition) |
| 162 | // CHECK: Punctuation: "-" [22:1 - 22:2] ObjCInstanceMethodDecl=method:22:1 (Definition) |
| 163 | // CHECK: Punctuation: "(" [22:3 - 22:4] ObjCInstanceMethodDecl=method:22:1 (Definition) |
| 164 | // CHECK: Keyword: "void" [22:4 - 22:8] ObjCInstanceMethodDecl=method:22:1 (Definition) |
| 165 | // CHECK: Punctuation: ")" [22:8 - 22:9] ObjCInstanceMethodDecl=method:22:1 (Definition) |
| 166 | // CHECK: Identifier: "method" [22:10 - 22:16] ObjCInstanceMethodDecl=method:22:1 (Definition) |
| 167 | // CHECK: Punctuation: "{" [23:1 - 23:2] UnexposedStmt= |
| 168 | // CHECK: Identifier: "barType" [24:5 - 24:12] TypeRef=barType:14:15 |
| 169 | // CHECK: Identifier: "local" [24:13 - 24:18] VarDecl=local:24:13 (Definition) |
| 170 | // CHECK: Punctuation: "=" [24:19 - 24:20] VarDecl=local:24:13 (Definition) |
| 171 | // CHECK: Identifier: "iVar" [24:21 - 24:25] MemberRefExpr=iVar:17:13 |
| 172 | // CHECK: Punctuation: ";" [24:25 - 24:26] UnexposedStmt= |
| 173 | // CHECK: Punctuation: "}" [25:1 - 25:2] UnexposedStmt= |
| 174 | // CHECK: Punctuation: "@" [26:1 - 26:2] ObjCImplementationDecl=Bar:21:1 (Definition) |
| 175 | // CHECK: Keyword: "end" [26:2 - 26:5] |
Daniel Dunbar | e0530b0 | 2010-05-12 21:54:41 +0000 | [diff] [blame] | 176 | // CHECK: Punctuation: "@" [32:1 - 32:2] ObjCInterfaceDecl=IBActionTests:32:12 |
| 177 | // CHECK: Keyword: "interface" [32:2 - 32:11] ObjCInterfaceDecl=IBActionTests:32:12 |
| 178 | // CHECK: Identifier: "IBActionTests" [32:12 - 32:25] ObjCInterfaceDecl=IBActionTests:32:12 |
| 179 | // CHECK: Punctuation: "-" [33:1 - 33:2] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 180 | // CHECK: Punctuation: "(" [33:3 - 33:4] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 181 | // CHECK: Identifier: "IBAction" [33:4 - 33:12] macro instantiation=IBAction |
| 182 | // CHECK: Punctuation: ")" [33:12 - 33:13] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 183 | // CHECK: Identifier: "actionMethod" [33:14 - 33:26] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 184 | // CHECK: Punctuation: ":" [33:26 - 33:27] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 185 | // CHECK: Punctuation: "(" [33:27 - 33:28] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 186 | // CHECK: Identifier: "id" [33:28 - 33:30] TypeRef=id:0:0 |
| 187 | // CHECK: Punctuation: ")" [33:30 - 33:31] ParmDecl=arg:33:31 (Definition) |
| 188 | // CHECK: Identifier: "arg" [33:31 - 33:34] ParmDecl=arg:33:31 (Definition) |
| 189 | // CHECK: Punctuation: ";" [33:34 - 33:35] ObjCInstanceMethodDecl=actionMethod::33:1 |
| 190 | // CHECK: Punctuation: "-" [34:1 - 34:2] ObjCInstanceMethodDecl=foo::34:1 |
| 191 | // CHECK: Punctuation: "(" [34:3 - 34:4] ObjCInstanceMethodDecl=foo::34:1 |
| 192 | // CHECK: Keyword: "void" [34:4 - 34:8] ObjCInstanceMethodDecl=foo::34:1 |
| 193 | // CHECK: Punctuation: ")" [34:8 - 34:9] ObjCInstanceMethodDecl=foo::34:1 |
| 194 | // CHECK: Identifier: "foo" [34:9 - 34:12] ObjCInstanceMethodDecl=foo::34:1 |
| 195 | // CHECK: Punctuation: ":" [34:12 - 34:13] ObjCInstanceMethodDecl=foo::34:1 |
| 196 | // CHECK: Punctuation: "(" [34:13 - 34:14] ObjCInstanceMethodDecl=foo::34:1 |
| 197 | // CHECK: Keyword: "int" [34:14 - 34:17] ParmDecl=x:34:18 (Definition) |
| 198 | // CHECK: Punctuation: ")" [34:17 - 34:18] ParmDecl=x:34:18 (Definition) |
| 199 | // CHECK: Identifier: "x" [34:18 - 34:19] ParmDecl=x:34:18 (Definition) |
| 200 | // CHECK: Punctuation: ";" [34:19 - 34:20] ObjCInstanceMethodDecl=foo::34:1 |
| 201 | // CHECK: Punctuation: "@" [35:1 - 35:2] ObjCInterfaceDecl=IBActionTests:32:12 |
| 202 | // CHECK: Keyword: "end" [35:2 - 35:5] ObjCInterfaceDecl=IBActionTests:32:12 |
| 203 | // CHECK: Keyword: "extern" [36:1 - 36:7] |
| 204 | // CHECK: Keyword: "int" [36:8 - 36:11] FunctionDecl=ibaction_test:36:12 |
| 205 | // CHECK: Identifier: "ibaction_test" [36:12 - 36:25] FunctionDecl=ibaction_test:36:12 |
| 206 | // CHECK: Punctuation: "(" [36:25 - 36:26] FunctionDecl=ibaction_test:36:12 |
| 207 | // CHECK: Keyword: "void" [36:26 - 36:30] FunctionDecl=ibaction_test:36:12 |
| 208 | // CHECK: Punctuation: ")" [36:30 - 36:31] FunctionDecl=ibaction_test:36:12 |
| 209 | // CHECK: Punctuation: ";" [36:31 - 36:32] |
| 210 | // CHECK: Punctuation: "@" [37:1 - 37:2] ObjCImplementationDecl=IBActionTests:37:1 (Definition) |
| 211 | // CHECK: Keyword: "implementation" [37:2 - 37:16] ObjCImplementationDecl=IBActionTests:37:1 (Definition) |
| 212 | // CHECK: Identifier: "IBActionTests" [37:17 - 37:30] ObjCImplementationDecl=IBActionTests:37:1 (Definition) |
| 213 | // CHECK: Punctuation: "-" [38:1 - 38:2] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 214 | // CHECK: Punctuation: "(" [38:3 - 38:4] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 215 | // CHECK: Identifier: "IBAction" [38:4 - 38:12] macro instantiation=IBAction |
| 216 | // CHECK: Punctuation: ")" [38:12 - 38:13] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 217 | // CHECK: Identifier: "actionMethod" [38:14 - 38:26] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 218 | // CHECK: Punctuation: ":" [38:26 - 38:27] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 219 | // CHECK: Punctuation: "(" [38:27 - 38:28] ObjCInstanceMethodDecl=actionMethod::38:1 (Definition) |
| 220 | // CHECK: Identifier: "id" [38:28 - 38:30] TypeRef=id:0:0 |
| 221 | // CHECK: Punctuation: ")" [38:30 - 38:31] ParmDecl=arg:38:31 (Definition) |
| 222 | // CHECK: Identifier: "arg" [38:31 - 38:34] ParmDecl=arg:38:31 (Definition) |
| 223 | // CHECK: Punctuation: "{" [39:1 - 39:2] UnexposedStmt= |
| 224 | // CHECK: Identifier: "ibaction_test" [40:5 - 40:18] DeclRefExpr=ibaction_test:36:12 |
| 225 | // CHECK: Punctuation: "(" [40:18 - 40:19] CallExpr=ibaction_test:36:12 |
| 226 | // CHECK: Punctuation: ")" [40:19 - 40:20] CallExpr=ibaction_test:36:12 |
| 227 | // CHECK: Punctuation: ";" [40:20 - 40:21] UnexposedStmt= |
| 228 | // CHECK: Punctuation: "[" [41:5 - 41:6] ObjCMessageExpr=foo::34:1 |
| 229 | // CHECK: Identifier: "self" [41:6 - 41:10] DeclRefExpr=self:0:0 |
| 230 | // CHECK: Identifier: "foo" [41:11 - 41:14] ObjCMessageExpr=foo::34:1 |
| 231 | // CHECK: Punctuation: ":" [41:14 - 41:15] ObjCMessageExpr=foo::34:1 |
| 232 | // CHECK: Literal: "0" [41:15 - 41:16] UnexposedExpr= |
| 233 | // CHECK: Punctuation: "]" [41:16 - 41:17] ObjCMessageExpr=foo::34:1 |
| 234 | // CHECK: Punctuation: ";" [41:17 - 41:18] UnexposedStmt= |
| 235 | // CHECK: Punctuation: "}" [42:1 - 42:2] UnexposedStmt= |
| 236 | // CHECK: Punctuation: "-" [43:1 - 43:2] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 237 | // CHECK: Punctuation: "(" [43:3 - 43:4] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 238 | // CHECK: Keyword: "void" [43:4 - 43:8] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 239 | // CHECK: Punctuation: ")" [43:8 - 43:9] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 240 | // CHECK: Identifier: "foo" [43:10 - 43:13] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 241 | // CHECK: Punctuation: ":" [43:13 - 43:14] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 242 | // CHECK: Punctuation: "(" [43:14 - 43:15] ObjCInstanceMethodDecl=foo::43:1 (Definition) |
| 243 | // CHECK: Keyword: "int" [43:15 - 43:18] ParmDecl=x:43:19 (Definition) |
| 244 | // CHECK: Punctuation: ")" [43:18 - 43:19] ParmDecl=x:43:19 (Definition) |
| 245 | // CHECK: Identifier: "x" [43:19 - 43:20] ParmDecl=x:43:19 (Definition) |
| 246 | // CHECK: Punctuation: "{" [44:1 - 44:2] UnexposedStmt= |
| 247 | // CHECK: Punctuation: "(" [45:3 - 45:4] UnexposedExpr=x:43:19 |
| 248 | // CHECK: Keyword: "void" [45:4 - 45:8] UnexposedExpr=x:43:19 |
| 249 | // CHECK: Punctuation: ")" [45:8 - 45:9] UnexposedExpr=x:43:19 |
| 250 | // CHECK: Identifier: "x" [45:10 - 45:11] DeclRefExpr=x:43:19 |
| 251 | // CHECK: Punctuation: ";" [45:11 - 45:12] UnexposedStmt= |
| 252 | // CHECK: Punctuation: "}" [46:1 - 46:2] UnexposedStmt= |
| 253 | // CHECK: Punctuation: "@" [47:1 - 47:2] ObjCImplementationDecl=IBActionTests:37:1 (Definition) |
| 254 | // CHECK: Keyword: "end" [47:2 - 47:5] |
| 255 | // CHECK: Punctuation: "@" [51:1 - 51:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 256 | // CHECK: Keyword: "interface" [51:2 - 51:11] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 257 | // CHECK: Identifier: "IBOutletTests" [51:12 - 51:25] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 258 | // CHECK: Punctuation: "{" [52:1 - 52:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 259 | // CHECK: Identifier: "IBOutlet" [53:5 - 53:13] macro instantiation=IBOutlet |
Daniel Dunbar | e0530b0 | 2010-05-12 21:54:41 +0000 | [diff] [blame] | 260 | // CHECK: Keyword: "char" [53:14 - 53:18] ObjCIvarDecl=anOutlet:53:21 (Definition) |
| 261 | // CHECK: Punctuation: "*" [53:19 - 53:20] ObjCIvarDecl=anOutlet:53:21 (Definition) |
| 262 | // CHECK: Identifier: "anOutlet" [53:21 - 53:29] ObjCIvarDecl=anOutlet:53:21 (Definition) |
| 263 | // CHECK: Punctuation: ";" [53:29 - 53:30] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 264 | // CHECK: Punctuation: "}" [54:1 - 54:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 265 | // CHECK: Punctuation: "-" [55:1 - 55:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 266 | // CHECK: Punctuation: "(" [55:3 - 55:4] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 267 | // CHECK: Identifier: "IBAction" [55:4 - 55:12] macro instantiation=IBAction |
| 268 | // CHECK: Punctuation: ")" [55:12 - 55:13] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 269 | // CHECK: Identifier: "actionMethod" [55:14 - 55:26] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 270 | // CHECK: Punctuation: ":" [55:26 - 55:27] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 271 | // CHECK: Punctuation: "(" [55:27 - 55:28] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 272 | // CHECK: Identifier: "id" [55:28 - 55:30] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 273 | // CHECK: Punctuation: ")" [55:30 - 55:31] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 274 | // CHECK: Identifier: "arg" [55:31 - 55:34] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 275 | // CHECK: Punctuation: ";" [55:34 - 55:35] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 276 | // CHECK: Punctuation: "@" [56:1 - 56:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 277 | // CHECK: Keyword: "property" [56:2 - 56:10] ObjCInterfaceDecl=IBOutletTests:51:12 |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 278 | // CHECK: Identifier: "IBOutlet" [56:11 - 56:19] macro instantiation=IBOutlet |
Daniel Dunbar | e0530b0 | 2010-05-12 21:54:41 +0000 | [diff] [blame] | 279 | // CHECK: Keyword: "int" [56:20 - 56:23] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 280 | // CHECK: Punctuation: "*" [56:24 - 56:25] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 281 | // CHECK: Identifier: "aPropOutlet" [56:26 - 56:37] ObjCPropertyDecl=aPropOutlet:56:26 |
| 282 | // CHECK: Punctuation: ";" [56:37 - 56:38] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 283 | // CHECK: Punctuation: "@" [57:1 - 57:2] ObjCInterfaceDecl=IBOutletTests:51:12 |
| 284 | // CHECK: Keyword: "end" [57:2 - 57:5] ObjCInterfaceDecl=IBOutletTests:51:12 |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 285 | // CHECK: Punctuation: "#" [63:1 - 63:2] preprocessing directive= |
| 286 | // CHECK: Identifier: "define" [63:2 - 63:8] preprocessing directive= |
| 287 | // CHECK: Identifier: "VAL" [63:9 - 63:12] macro definition=VAL |
Douglas Gregor | 4419b67 | 2010-10-21 06:10:04 +0000 | [diff] [blame^] | 288 | // CHECK: Literal: "0" [63:13 - 63:14] macro definition=VAL |
Ted Kremenek | d8b0a84 | 2010-08-25 22:16:02 +0000 | [diff] [blame] | 289 | // CHECK: Punctuation: "@" [65:1 - 65:2] ObjCInterfaceDecl=R7974151:65:12 |
| 290 | // CHECK: Keyword: "interface" [65:2 - 65:11] ObjCInterfaceDecl=R7974151:65:12 |
| 291 | // CHECK: Identifier: "R7974151" [65:12 - 65:20] ObjCInterfaceDecl=R7974151:65:12 |
| 292 | // CHECK: Punctuation: "-" [66:1 - 66:2] ObjCInstanceMethodDecl=foo::66:1 |
| 293 | // CHECK: Punctuation: "(" [66:3 - 66:4] ObjCInstanceMethodDecl=foo::66:1 |
| 294 | // CHECK: Keyword: "int" [66:4 - 66:7] ObjCInstanceMethodDecl=foo::66:1 |
| 295 | // CHECK: Punctuation: ")" [66:7 - 66:8] ObjCInstanceMethodDecl=foo::66:1 |
| 296 | // CHECK: Identifier: "foo" [66:9 - 66:12] ObjCInstanceMethodDecl=foo::66:1 |
| 297 | // CHECK: Punctuation: ":" [66:12 - 66:13] ObjCInstanceMethodDecl=foo::66:1 |
| 298 | // CHECK: Punctuation: "(" [66:13 - 66:14] ObjCInstanceMethodDecl=foo::66:1 |
| 299 | // CHECK: Keyword: "int" [66:14 - 66:17] ParmDecl=arg:66:18 (Definition) |
| 300 | // CHECK: Punctuation: ")" [66:17 - 66:18] ParmDecl=arg:66:18 (Definition) |
| 301 | // CHECK: Identifier: "arg" [66:18 - 66:21] ParmDecl=arg:66:18 (Definition) |
| 302 | // CHECK: Punctuation: ";" [66:21 - 66:22] ObjCInstanceMethodDecl=foo::66:1 |
| 303 | // CHECK: Punctuation: "-" [67:1 - 67:2] ObjCInstanceMethodDecl=method:67:1 |
| 304 | // CHECK: Punctuation: "(" [67:3 - 67:4] ObjCInstanceMethodDecl=method:67:1 |
| 305 | // CHECK: Keyword: "int" [67:4 - 67:7] ObjCInstanceMethodDecl=method:67:1 |
| 306 | // CHECK: Punctuation: ")" [67:7 - 67:8] ObjCInstanceMethodDecl=method:67:1 |
| 307 | // CHECK: Identifier: "method" [67:9 - 67:15] ObjCInstanceMethodDecl=method:67:1 |
| 308 | // CHECK: Punctuation: ";" [67:15 - 67:16] ObjCInstanceMethodDecl=method:67:1 |
| 309 | // CHECK: Punctuation: "@" [68:1 - 68:2] ObjCInterfaceDecl=R7974151:65:12 |
| 310 | // CHECK: Keyword: "end" [68:2 - 68:5] ObjCInterfaceDecl=R7974151:65:12 |
| 311 | // CHECK: Punctuation: "@" [70:1 - 70:2] ObjCImplementationDecl=R7974151:70:1 (Definition) |
| 312 | // CHECK: Keyword: "implementation" [70:2 - 70:16] ObjCImplementationDecl=R7974151:70:1 (Definition) |
| 313 | // CHECK: Identifier: "R7974151" [70:17 - 70:25] ObjCImplementationDecl=R7974151:70:1 (Definition) |
| 314 | // CHECK: Punctuation: "-" [71:1 - 71:2] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 315 | // CHECK: Punctuation: "(" [71:3 - 71:4] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 316 | // CHECK: Keyword: "int" [71:4 - 71:7] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 317 | // CHECK: Punctuation: ")" [71:7 - 71:8] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 318 | // CHECK: Identifier: "foo" [71:9 - 71:12] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 319 | // CHECK: Punctuation: ":" [71:12 - 71:13] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 320 | // CHECK: Punctuation: "(" [71:13 - 71:14] ObjCInstanceMethodDecl=foo::71:1 (Definition) |
| 321 | // CHECK: Keyword: "int" [71:14 - 71:17] ParmDecl=arg:71:18 (Definition) |
| 322 | // CHECK: Punctuation: ")" [71:17 - 71:18] ParmDecl=arg:71:18 (Definition) |
| 323 | // CHECK: Identifier: "arg" [71:18 - 71:21] ParmDecl=arg:71:18 (Definition) |
| 324 | // CHECK: Punctuation: "{" [71:22 - 71:23] UnexposedStmt= |
| 325 | // CHECK: Keyword: "return" [72:3 - 72:9] UnexposedStmt= |
| 326 | // CHECK: Identifier: "arg" [72:10 - 72:13] DeclRefExpr=arg:71:18 |
| 327 | // CHECK: Punctuation: ";" [72:13 - 72:14] UnexposedStmt= |
| 328 | // CHECK: Punctuation: "}" [73:1 - 73:2] UnexposedStmt= |
| 329 | // CHECK: Punctuation: "-" [74:1 - 74:2] ObjCInstanceMethodDecl=method:74:1 (Definition) |
| 330 | // CHECK: Punctuation: "(" [74:3 - 74:4] ObjCInstanceMethodDecl=method:74:1 (Definition) |
| 331 | // CHECK: Keyword: "int" [74:4 - 74:7] ObjCInstanceMethodDecl=method:74:1 (Definition) |
| 332 | // CHECK: Punctuation: ")" [74:7 - 74:8] ObjCInstanceMethodDecl=method:74:1 (Definition) |
| 333 | // CHECK: Identifier: "method" [74:9 - 74:15] ObjCInstanceMethodDecl=method:74:1 (Definition) |
| 334 | // CHECK: Punctuation: "{" [75:1 - 75:2] UnexposedStmt= |
| 335 | // CHECK: Keyword: "int" [76:5 - 76:8] VarDecl=local:76:9 (Definition) |
| 336 | // CHECK: Identifier: "local" [76:9 - 76:14] VarDecl=local:76:9 (Definition) |
| 337 | // CHECK: Punctuation: "=" [76:15 - 76:16] VarDecl=local:76:9 (Definition) |
| 338 | // CHECK: Punctuation: "[" [76:17 - 76:18] ObjCMessageExpr=foo::66:1 |
| 339 | // CHECK: Identifier: "self" [76:18 - 76:22] DeclRefExpr=self:0:0 |
| 340 | // CHECK: Identifier: "foo" [76:23 - 76:26] ObjCMessageExpr=foo::66:1 |
| 341 | // CHECK: Punctuation: ":" [76:26 - 76:27] ObjCMessageExpr=foo::66:1 |
| 342 | // CHECK: Identifier: "VAL" [76:27 - 76:30] macro instantiation=VAL:63:9 |
| 343 | // CHECK: Punctuation: "]" [76:30 - 76:31] ObjCMessageExpr=foo::66:1 |
| 344 | // CHECK: Punctuation: ";" [76:31 - 76:32] UnexposedStmt= |
| 345 | // CHECK: Keyword: "int" [77:5 - 77:8] VarDecl=second:77:9 (Definition) |
| 346 | // CHECK: Identifier: "second" [77:9 - 77:15] VarDecl=second:77:9 (Definition) |
| 347 | // CHECK: Punctuation: "=" [77:16 - 77:17] VarDecl=second:77:9 (Definition) |
| 348 | // CHECK: Punctuation: "[" [77:18 - 77:19] ObjCMessageExpr=foo::66:1 |
| 349 | // CHECK: Identifier: "self" [77:19 - 77:23] DeclRefExpr=self:0:0 |
| 350 | // CHECK: Identifier: "foo" [77:24 - 77:27] ObjCMessageExpr=foo::66:1 |
| 351 | // CHECK: Punctuation: ":" [77:27 - 77:28] ObjCMessageExpr=foo::66:1 |
| 352 | // CHECK: Literal: "0" [77:28 - 77:29] UnexposedExpr= |
| 353 | // CHECK: Punctuation: "]" [77:29 - 77:30] ObjCMessageExpr=foo::66:1 |
| 354 | // CHECK: Punctuation: ";" [77:30 - 77:31] UnexposedStmt= |
| 355 | // CHECK: Keyword: "return" [78:5 - 78:11] UnexposedStmt= |
| 356 | // CHECK: Identifier: "local" [78:12 - 78:17] DeclRefExpr=local:76:9 |
| 357 | // CHECK: Punctuation: ";" [78:17 - 78:18] UnexposedStmt= |
| 358 | // CHECK: Punctuation: "}" [79:1 - 79:2] UnexposedStmt= |
Douglas Gregor | db1314e | 2010-10-01 21:11:22 +0000 | [diff] [blame] | 359 | // CHECK: Punctuation: "-" [80:1 - 80:2] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 360 | // CHECK: Punctuation: "(" [80:3 - 80:4] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 361 | // CHECK: Keyword: "int" [80:4 - 80:7] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 362 | // CHECK: Punctuation: ")" [80:7 - 80:8] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 363 | // CHECK: Identifier: "othermethod" [80:8 - 80:19] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 364 | // CHECK: Punctuation: ":" [80:19 - 80:20] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 365 | // CHECK: Punctuation: "(" [80:20 - 80:21] ObjCInstanceMethodDecl=othermethod::80:1 (Definition) |
| 366 | // CHECK: Identifier: "IBOutletTests" [80:21 - 80:34] ObjCClassRef=IBOutletTests:51:12 |
| 367 | // CHECK: Punctuation: "*" [80:35 - 80:36] ParmDecl=ibt:80:37 (Definition) |
| 368 | // CHECK: Punctuation: ")" [80:36 - 80:37] ParmDecl=ibt:80:37 (Definition) |
| 369 | // CHECK: Identifier: "ibt" [80:37 - 80:40] ParmDecl=ibt:80:37 (Definition) |
| 370 | // CHECK: Punctuation: "{" [80:41 - 80:42] UnexposedStmt= |
| 371 | // CHECK: Keyword: "return" [81:3 - 81:9] UnexposedStmt= |
| 372 | // CHECK: Punctuation: "*" [81:10 - 81:11] UnexposedExpr= |
| 373 | // CHECK: Identifier: "ibt" [81:11 - 81:14] DeclRefExpr=ibt:80:37 |
| 374 | // CHECK: Punctuation: "." [81:14 - 81:15] MemberRefExpr=aPropOutlet:56:26 |
| 375 | // CHECK: Identifier: "aPropOutlet" [81:15 - 81:26] MemberRefExpr=aPropOutlet:56:26 |
| 376 | // CHECK: Punctuation: ";" [81:26 - 81:27] UnexposedStmt= |
| 377 | // CHECK: Punctuation: "}" [82:1 - 82:2] UnexposedStmt= |
| 378 | // CHECK: Punctuation: "@" [83:1 - 83:2] ObjCImplementationDecl=R7974151:70:1 (Definition) |
| 379 | // CHECK: Keyword: "end" [83:2 - 83:5] |
| 380 | // CHECK: Punctuation: "@" [85:1 - 85:2] ObjCProtocolDecl=Proto:85:1 (Definition) |
| 381 | // CHECK: Keyword: "protocol" [85:2 - 85:10] ObjCProtocolDecl=Proto:85:1 (Definition) |
| 382 | // CHECK: Identifier: "Proto" [85:11 - 85:16] ObjCProtocolDecl=Proto:85:1 (Definition) |
| 383 | // CHECK: Punctuation: "@" [85:17 - 85:18] ObjCProtocolDecl=Proto:85:1 (Definition) |
| 384 | // CHECK: Keyword: "end" [85:18 - 85:21] ObjCProtocolDecl=Proto:85:1 (Definition) |
| 385 | // CHECK: Keyword: "void" [87:1 - 87:5] FunctionDecl=f:87:6 (Definition) |
| 386 | // CHECK: Identifier: "f" [87:6 - 87:7] FunctionDecl=f:87:6 (Definition) |
| 387 | // CHECK: Punctuation: "(" [87:7 - 87:8] FunctionDecl=f:87:6 (Definition) |
| 388 | // CHECK: Punctuation: ")" [87:8 - 87:9] FunctionDecl=f:87:6 (Definition) |
| 389 | // CHECK: Punctuation: "{" [87:10 - 87:11] UnexposedStmt= |
| 390 | // CHECK: Punctuation: "(" [88:3 - 88:4] UnexposedExpr=Proto:85:1 |
| 391 | // CHECK: Keyword: "void" [88:4 - 88:8] UnexposedExpr=Proto:85:1 |
| 392 | // CHECK: Punctuation: ")" [88:8 - 88:9] UnexposedExpr=Proto:85:1 |
| 393 | // CHECK: Punctuation: "@" [88:9 - 88:10] UnexposedExpr=Proto:85:1 |
| 394 | // CHECK: Keyword: "protocol" [88:10 - 88:18] UnexposedExpr=Proto:85:1 |
| 395 | // CHECK: Punctuation: "(" [88:18 - 88:19] UnexposedExpr=Proto:85:1 |
| 396 | // CHECK: Identifier: "Proto" [88:19 - 88:24] UnexposedExpr=Proto:85:1 |
| 397 | // CHECK: Punctuation: ")" [88:24 - 88:25] UnexposedExpr=Proto:85:1 |
| 398 | // CHECK: Punctuation: ";" [88:25 - 88:26] UnexposedStmt= |
| 399 | // CHECK: Punctuation: "}" [89:1 - 89:2] UnexposedStmt= |