ilya-biryukov added inline comments.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:22
+ return;
+ if (Command.CommandLine.empty())
+ Command.CommandLine.push_back("clang");
----------------
If `Command.CommandLine.empty()` is true, extra flags will be added **before**
'clang' in the command-line.
Maybe restore `assert(Command.CommandLine.size() >= 2)` (i.e. at least a
compiler binary and input file should be in the commandline) and remove this if?
================
Comment at: clangd/GlobalCompilationDatabase.cpp:60
+ PathRef File, std::vector<std::string> ExtraFlags) {
+ ExtraFlagsForFile[File] = ExtraFlags;
}
----------------
Maybe `std::move` the vector before assignment to avoid copying?
https://reviews.llvm.org/D34947
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits