[cfe-dev] Determining if ObjCIvarDecl is in multi-declaration
Chris Lattner
clattner at apple.com
Fri Apr 25 19:23:12 PDT 2008
On Apr 25, 2008, at 2:59 PM, Emerson Murphy-Hill wrote:
>> I'm not sure what you mean by fuzzy editing. I'll try using the
>> lexer
>> to determine if there is a comma between the type at the semicolon.
>
> Ok, so my lexing code kinda works, except that commas can also appear
> in instance variables that are function pointers. And probably other
> wacky c corners that I don't know about.
>
> Anyway, a related question: can I get the start and end source
> location for the instance variable statement, not just the instance
> variable name itself? E.g., the whole SourceRange of "int a;", not
> just of "a".
Sure, in a function, the decl will be wrapped in a declstmt, and the
declstmt itself will have a range for the whole declaration.
-Chris
More information about the cfe-dev
mailing list