[cfe-dev] does clang have a symbol table ?

kevinlynx kevinlynx at gmail.com
Wed Jan 9 22:37:19 PST 2013


Of course clang have a symbol table (or more) I guess. But what I want is, how to use them ? Here I have some questions related to symbol table:

(I implement a class inherited from RecursiveASTVisitor, so the question below is based on this)

1. In the same code scope, I define two variables but with the same name. How to check this by a VarDecl ?
2. If I define a variable which has the same name as a global variable, or a variable in the outter scope. How to check this ?
3. I define a struct type, and define a variable with this type, how to get more type information from QualType ?

ps. I googled for a while and it seems I can use Sema class, but Sema is a huge class with lots of member functions. So it's really difficult to start with Sema without any documents/tutorials. 

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130110/8e44de1e/attachment.html>


More information about the cfe-dev mailing list