[cfe-dev] lookup of a variable

Jan Bierbaum s3306700 at inf.tu-dresden.de
Wed Sep 1 13:13:34 PDT 2010


Douglas Gregor meinte am 01.09.2010 16:18:
>> Given the qualified identifier of a variable (as a pure string like
>> "A::B::foo"), an ASTContext and a Sema how can I
> 
> If you're actually coming from a string, you should consider watching
> what the parser does when parsing A::B::foo as an id-expression.

I did that, but ran into a dead end soon. The parser starts with a
'ParsingDeclSpec' which I cannot create because I'm missing a reference
to the parser. From there on I cannot replicate any of the actions the
parser does. Perhaps I should have mentioned earlier that I'm working
from inside a plugin's 'SemaConsumer'...

The core of my problem is that I need some way to hand craft an
'IdentifierInfo' without the parser. Is that possible at all?


Regards, Jan.



More information about the cfe-dev mailing list