[cfe-dev] lookup from AST

Axel Naumann Axel.Naumann at cern.ch
Thu Oct 15 06:06:37 PDT 2009


Hi,

progress, but not enough:

Axel Naumann wrote on 10/15/2009 10:58 AM:
> Should I create an IdentifierTable and put that single name (and its 
> declaring contexts) that I want to look up in there? Or is there a 
> simpler way of creating a DeclarationName from a string?

of course this is the wrong approach; I should first lex the string. But 
building a full blown preprocessor every time I need to lex a string 
like "nsp::class" looks a bit heavy. Is there a shortcut? Is it 
Preprocessor::CreateString()?

And the offer below still stands ;-)

Cheers, Axel.

>  > but it only looks in that context---it doesn't
>  > perform full C++ qualified name lookup.
>> The real name-lookup routines live in Sema, but there are multiple 
>> clients that could benefit from moving these routines into the AST. For 
>> qualified name lookup, it's "just" a bunch of refactoring. 
> 
> Qualified is all I need, so having those available outside of Sema would 
> be nice. Should I give it a try and suggest a patch? If so, should I 
> simply replace DeclContext::lookup by what Sema::LookupQualifiedName 
> currently does? I believe given qualified lookup in DeclContext we 
> wouldn't need DeclContext::lookup anymore.
> 
> Cheers, Axel.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 



More information about the cfe-dev mailing list