<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 16, 2008, at 6:48 AM, Makslane Araújo Rodrigues wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Hi,<br> <br>I'm new at clang and llvm. I want to build an IDE thats show the symbol properties when the user select it on the code.<br> <br>How can I get information about a symbol by giving the SourceLocation?<br>(Like if the symbol is an identifier, the type...)<br> </div></span></blockquote><br></div><div>The best way to do this is to do a walk over the AST, building up a reverse mapping from location -> decl (or location -> expr).  This will allow efficient lookup with a SourceLocation.</div><div><br class="webkit-block-placeholder"></div><div>-Chris</div><br></body></html>