(no subject)

Hi all,

How can i get the type of variable for eg. const int x = 1;
How can i get information that x is const and int. I have pointer to DeclStmt, from that i can get VarDecl. I am stuck after that.

Thanks
Manavender

In general this is what you should do.
1) Look what kind of AST clang generates. You can see it by: clang -cc1 -ast-dump foo.c

2) Then look at the doxygen documentation: http://clang.llvm.org/doxygen

And find the related AST in the documentation and see if it has a member getType() defined
for it. It could be in the AST or one of its base classes.

- Fariborz