[PATCH] Transform all files in a compilation database if no source files are provided.
Ariel Bernal
ariel.j.bernal at intel.com
Tue Aug 27 12:43:52 PDT 2013
@revane Here I'll try to summarize the possible cases:
1) FixCompilationDatabase:
* if the user specifies --
* if no compilation database can be detected from Source0
2) JSONCompilationDatabase:
* if the user specifies -p <Subdir>
- if sources are not specified we populate Sources from the compilation database.
* if a compilation database can detected from Source0
Now if the user specifies -include/include-from-file I think we should filter out the Sources added from the compilation database but not sources explicitly provided by the user.
I mean suppose the following case
cpp11-migrate -include test_dir myfile.cpp test/myfile2.cpp
##myfile2.cpp## will be transform but ##myfile.cpp## won't since is not in the include list (maybe another argument against using the same include for headers and sources?). In this case me may just want to ignore -include for sources.
Do you agree with this?
Your idea of populating IncludeExcludeInfo from the sources if the user doesn't specify -include/include-from-file can be done after the Sources are populated.
http://llvm-reviews.chandlerc.com/D1517
More information about the cfe-commits
mailing list