<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>We should mark it as CXToken_Keyword, as we do with other context-sensitive keywords (see at end of clang_annotateTokensImpl); please file a bug report.</div><br><div><div>On Apr 3, 2013, at 9:09 AM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I don't happen to know specifically, but I will note that "super" is not an expression; it's a context-sensitive keyword. ("self", on the other hand, is an implicit parameter with a fixed name.) As such, there's no useful Expr that can be attached to it. I would guess libclang picks the ObjCMessageExpr as the "best" context and leaves it at that.<br><br>Jordan<br><br><br>On Apr 2, 2013, at 12:44 , Erik Verbruggen <<a href="mailto:erikjv@me.com">erikjv@me.com</a>> wrote:<br><br><blockquote type="cite">Another token annotation question, this time about ObjC's self/super.<br><br>I have this snippet:<br><br> SubIFace *inst;<br> [inst a];<br> [self a];<br> [super a];<br><br>When running that through c-index-test -test-annotate-tokens, I get some results I don't completely understand:<br><br>Identifier: "SubIFace" [153:14 - 153:22] ObjCClassRef=SubIFace:148:12<br>Punctuation: "*" [153:23 - 153:24] VarDecl=inst:153:24 (Definition)<br>Identifier: "inst" [153:24 - 153:28] VarDecl=inst:153:24 (Definition)<br>Punctuation: ";" [153:28 - 153:29] DeclStmt=<br>Punctuation: "[" [154:5 - 154:6] ObjCMessageExpr=a:146:10<br>Identifier: "inst" [154:6 - 154:10] DeclRefExpr=inst:153:24<br>Identifier: "a" [154:11 - 154:12] ObjCMessageExpr=a:146:10<br>Punctuation: "]" [154:12 - 154:13] ObjCMessageExpr=a:146:10<br>Punctuation: ";" [154:13 - 154:14] CompoundStmt=<br>Punctuation: "[" [155:5 - 155:6] ObjCMessageExpr=a:146:10<br>Identifier: "self" [155:6 - 155:10] DeclRefExpr=self:0:0<br>Identifier: "a" [155:11 - 155:12] ObjCMessageExpr=a:146:10<br>Punctuation: "]" [155:12 - 155:13] ObjCMessageExpr=a:146:10<br>Punctuation: ";" [155:13 - 155:14] CompoundStmt=<br>Punctuation: "[" [156:5 - 156:6] ObjCMessageExpr=a:146:10<br>Identifier: "super" [156:6 - 156:11] ObjCMessageExpr=a:146:10<br>Identifier: "a" [156:12 - 156:13] ObjCMessageExpr=a:146:10<br>Punctuation: "]" [156:13 - 156:14] ObjCMessageExpr=a:146:10<br>Punctuation: ";" [156:14 - 156:15] CompoundStmt=<br><br>So, "inst" in the first expression is a DeclRefExpr, just like "self" in the second one. However, "super" in the last expression is annotated with "ObjCMessageExpr=a"... Is that on purpose, and if so, what is the reasoning behind it?<br><br>Regards,<br>Erik.<br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></blockquote></div><br></body></html>