[cfe-dev] Determining if ObjCIvarDecl is in multi-declaration
emerson at apple.com
Fri Apr 25 16:59:45 CDT 2008
On Apr 24, 2008, at 1:19 PM, Emerson Murphy-Hill wrote:
> On Apr 23, 2008, at 10:56 PM, Chris Lattner wrote:
>> Okay, so you need more information, or some amount of fuzziness to
>> do this. Specifically, if you have:
>> int *X, ***Y;
>> Even if you know that X/Y are multi-declaration, you'll have to have
>> some way of handling the *'s and the array suffix. Because types
>> are unique'd, they don't have location information. Handling this
>> sort of thing will require some amount of fuzzy editting: could
>> fuzzy editting be used to scan for the comma also?
> 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".
More information about the cfe-dev