[cfe-dev] libtooling: how to get the list of include files for a translation unit
Manuel Klimek
klimek at google.com
Mon Aug 4 05:53:09 PDT 2014
You can take a look at how clang-tidy does it:
tools-extra/clang-tidy/ClangTidy.cpp
On Wed, Jul 23, 2014 at 9:30 AM, Wilhelm <wilhelm.meier at fh-kl.de> wrote:
> Hi James,
>
> Am 21.07.2014 um 20:11 schrieb James Dennett:
> > On Mon, Jul 21, 2014 at 9:18 AM, Wilhelm <wilhelm.meier at fh-kl.de> wrote:
> >> Hi all,
> >>
> >> I managed to write an RecursiveASTVisitor<> with libtooling.
> >>
> >> Now I want to get the list of header files included to form the actual
> >> translation unit. I googled for a while now, but got no idea how to
> >> retrieve this information.
> >>
> >> Any help?
> >
> > One approach/starting point: If you provide an implementation of
> > PPCallbacks you can override FileChanged.
>
> thank you for this advice.
>
> I'm using clang::ClangTool to run an ASTFrontendAction over the source
> files. I looked around, but I have no idea how to set the PPCallbacks to
> the Preprocessor.
>
> Any help?
>
> --
> Wilhelm
> w.meier at unix.net
> _______________________________________________
> 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/20140804/c1aeed1f/attachment.html>
More information about the cfe-dev
mailing list