[cfe-dev] TreeTransform and Clang

Vassil Vassilev vasil.georgiev.vasilev at cern.ch
Fri Aug 20 04:08:38 PDT 2010


Hello Doug,
  Sorry for the delayed answer but I tried to dig a little bit in the
problem. After all I am going to try what you suggested:
> The right way to do this would be to augment Sema's name-lookup facilities, so that your application gets a chance to provide symbols when no other symbols of the same name work. One way to do this is to create your own ExternalASTSource, and override FindExternalVisibleDeclsByName to add those symbols. If I remember correctly, LLDB does this.
If I have understood correctly I need to create a new class in the
interpreter which is actually new ExternalASTSource. Then the Sema is
going to check for the symbol first in the most inner scope then outer
and finally it will check the ExternalASTSource class if it can
recognize the symbol. If it does then it is going to put what I want in
the AST right?
Where I have to register the new class in order to be found by clang
sema?

Best regards,
V. Vassilev 




More information about the cfe-dev mailing list