From the VarDecl you can get the QualType, which has the information you need. Using the -cc1 parameter -ast-dump can be useful here too, to see what the layout is in the AST.
On Aug 17, 2010, at 3:30 PM, manavender reddy wrote:
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
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev