[cfe-dev] How to get (lowest) AST node for given location
Manuel Klimek
klimek at google.com
Mon Jun 29 02:14:44 PDT 2015
clang-rename/USRFinder.cpp in the tools-extra repo give you a rough idea
how to do that...
On Sun, Jun 28, 2015 at 4:15 PM Maciej Poleski <
d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com> wrote:
> Hi,
>
> I have precise location information (source file name, offset/line+column
> number) and initialized CompilationDatabase (in RefactoringTool).
> I want to get AST node for this location.
>
> The problem I'm trying to solve is to answer question: "What is here?" in
> source code.
>
> The other (but connected) question: Can I reuse AST nodes from different
> ClangTool invocations? (To such big extent to assume that addresses of
> these nodes can be compared)
>
> This time we have node from the first question and want to use this node
> in second query.
>
> Best Regards
> Maciej Poleski
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150629/4961dbb1/attachment.html>
More information about the cfe-dev
mailing list