[PATCH] D65320: [clangd] Fix background index not triggering on windows due to case mismatch.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 06:49:43 PDT 2019


sammccall marked 4 inline comments as done.
sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:168
     std::lock_guard<std::mutex> Lock(Mutex);
+    CachedCDB *Entry;
     if (CompileCommandsDir) {
----------------
hokein wrote:
> nit: set default `nullptr`.
Done, and also checked for it.


================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:210
   if (CompileCommandsDir) {
     assert(*CompileCommandsDir == Result.PI.SourceRoot &&
            "Trying to broadcast a CDB outside of CompileCommandsDir!");
----------------
hokein wrote:
> should we use the `pathEqual` here too?
no, if we have a CompileCommandsDir then we'll only search in that exact directory name, and so the result should match exactly


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65320/new/

https://reviews.llvm.org/D65320





More information about the cfe-commits mailing list