<div dir="ltr">I'd suggest you either use <a href="http://clang.llvm.org/docs/LibTooling.html">http://clang.llvm.org/docs/LibTooling.html</a>, 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 :)</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 19, 2013 at 12:47 PM, lotay <span dir="ltr"><<a href="mailto:158481612@qq.com" target="_blank">158481612@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add one file as main FileEntry in the FileManager, and add other cpp file as<br>
"normal" FileEntry-s (not the Main FileEntry).<br>
<br>
For example,<br>
<br>
main function locates in the Main.cpp, while Main.cpp include other header<br>
files, these header file "XXX.h" contain namespace, class and its methods<br>
declaration, while the implementation of these methods locate in "own"<br>
"XXX.cpp" files,<br>
<br>
The question is whether I can add these cpp files in the FileManager as<br>
"normal" FileEntrys.<br>
<br>
Thanks in advance.....<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/How-to-use-compilerInstance-to-analyze-multiple-cpp-file-tp4036700.html" target="_blank">http://clang-developers.42468.n3.nabble.com/How-to-use-compilerInstance-to-analyze-multiple-cpp-file-tp4036700.html</a><br>

Sent from the Clang Developers mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>