How to use compilerInstance to analyze multiple cpp file

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.....

I’d suggest you either use, 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 :slight_smile: