[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 05:34:55 PDT 2017
ilya-biryukov requested changes to this revision.
ilya-biryukov added inline comments.
This revision now requires changes to proceed.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:90
+
+ Logger.log("Failed to find compilation database for " + Twine(File) + "\n");
+ return nullptr;
----------------
This logging statement is misplaced, in the current HEAD it's outside of the loop.
(i.e. it should be in the `getCompilationDatabase`, not in `tryLoadDatabaseFromPath`).
Otherwise the output of clangd gets really spammy.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:100
+ if (CompileCommandsDir.hasValue())
+ return tryLoadDatabaseFromPath(CompileCommandsDir.getValue());
----------------
We should also log if we can't find compilation database in this code path.
https://reviews.llvm.org/D37150
More information about the cfe-commits
mailing list