This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.
Closed by commit rC329580: [Tooling] A CompilationDatabase wrapper that infers
header commands. (authored by sammccall, committed by ).
Changed prior to commit:
https://reviews.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL329580: [Tooling] A CompilationDatabase wrapper that infers
header commands. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llv
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a small nit.
Really excited about this landing!
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:353
+ }
+ Best = Candidate.firs
sammccall updated this revision to Diff 141172.
sammccall added a comment.
Address cross-language issues in a more comprehensive way.
Prefers (potentially) same-language over cross-language, handles cross-language
flag transfers correctly using -x and handling (dropping) -std.
Repository:
rC C
sammccall added inline comments.
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:308
+ llvm::sys::path::extension(Filename).substr(1));
+ if (OldLang && NewLang != OldLang) {
+Base.CommandLine.push_back("-x");
ilya-biryukov
sammccall updated this revision to Diff 140941.
sammccall marked 3 inline comments as done.
sammccall added a comment.
Address comments, except cross-language flag transfer which needs more thought.
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/Compilati
ilya-biryukov added inline comments.
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:96
+// Sort input for determinism (index is used as a tiebreaker).
+llvm::sort(OriginalPaths.begin(), OriginalPaths.end());
+for (size_t I = 0; I < Filenames.size(); ++I)
sammccall updated this revision to Diff 140802.
sammccall added a comment.
Add more tests, and only add -x when actually needed.
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Tooling/CMakeLists.txt
lib/Tooling/InterpolatingC
sammccall updated this revision to Diff 140792.
sammccall added a comment.
clang-format
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Tooling/CMakeLists.txt
lib/Tooling/InterpolatingCompilationDatabase.cpp
unittests/Toolin
sammccall updated this revision to Diff 140791.
sammccall marked 6 inline comments as done.
sammccall added a comment.
Address review comments.
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Tooling/CMakeLists.txt
lib/Tooling
sammccall added inline comments.
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:115
+for (auto F : getAllFiles())
+ Paths.emplace_back(Strings.save(F), 0);
+finalizeIndex();
ilya-biryukov wrote:
> This class seems to do two somewhat ort
ilya-biryukov added inline comments.
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:26
+// their compile commands. If getAllFilenames() is empty, no inference occurs.
+//
+//===--===//
-
sammccall updated this revision to Diff 140349.
sammccall added a comment.
Add tests, fix minor bugs, add lots of comments and structure.
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Tooling/CMakeLists.txt
lib/Tooling/Inter
sammccall updated this revision to Diff 140160.
sammccall added a comment.
Handle the case where no points are awarded (e.g. system headers) and document
awards better.
Repository:
rC Clang
https://reviews.llvm.org/D45006
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Tooling/CM
sammccall created this revision.
Herald added subscribers: cfe-commits, mgorny, klimek.
The wrapper finds the closest matching compile command using filename heuristics
and makes minimal tweaks so it can be used with the header.
(This is WIP and needs tests)
Repository:
rC Clang
https://revi
15 matches
Mail list logo