[cfe-dev] How to use compilerInstance to analyze multiple cpp file

Manuel Klimek klimek at google.com
Mon Dec 23 03:39:22 PST 2013


I'd suggest you either use http://clang.llvm.org/docs/LibTooling.html, or
look at the code in lib/Tooling, which supports exactly what you need; the
tl;dr is that it's not trivial to set up :)


On Thu, Dec 19, 2013 at 12:47 PM, lotay <158481612 at qq.com> wrote:

> Add one file as main FileEntry in the FileManager, and add other cpp file
> as
> "normal" FileEntry-s (not the Main FileEntry).
>
> For example,
>
> main function locates in the Main.cpp, while Main.cpp include other header
> files, these header file "XXX.h" contain namespace, class and its methods
> declaration, while the implementation of these methods locate in "own"
> "XXX.cpp" files,
>
> The question is whether I can add these cpp files in the FileManager as
> "normal" FileEntrys.
>
> Thanks in advance.....
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/How-to-use-compilerInstance-to-analyze-multiple-cpp-file-tp4036700.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/20131223/431c26a2/attachment.html>


More information about the cfe-dev mailing list