<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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.<div><br><div><div>On Aug 17, 2010, at 3:30 PM, manavender reddy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi all,<div><br></div><div>How can i get the type of variable for eg. const int x = 1;</div><div>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.</div>
<div><br></div><div>Thanks</div><div>Manavender</div></span>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></blockquote></div><br></div></body></html>