[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 08:12:18 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/index/Background.cpp:653
+    auto PI = CDB.getProjectInfo(File);
+    assert(PI && "Found CDB but no ProjectInfo!");
+
----------------
sammccall wrote:
> This looks like a bad assertion: it should be OK to provide compile commands but not project info.
> 
> (Otherwise getProjectInfo should be pure virtual, but I'm concerned about the raciness if we're going to insist they're consistent but not provide any way of synchronizing)
> 
> I'd suggest we should just not index such files (for now). Later we can start passing "" to the index storage factory to get the fallback storage (I think today we pass "", but the factory doesn't handle it - oops!)
actually we have a nullstorage for that, which just logs a messsage and doesn't persist the shard.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64247





More information about the cfe-commits mailing list