[cfe-dev] Get symbol properties
Chris Lattner
clattner at apple.com
Wed Apr 16 09:58:55 PDT 2008
On Apr 16, 2008, at 6:48 AM, Makslane Araújo Rodrigues wrote:
> Hi,
>
> 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.
>
> How can I get information about a symbol by giving the SourceLocation?
> (Like if the symbol is an identifier, the type...)
>
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.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080416/dd903de2/attachment.html>
More information about the cfe-dev
mailing list