[PATCH] D63986: [clangd] Also cache failures while indexing

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 1 10:02:24 PDT 2019


sammccall added a comment.

Still LG



================
Comment at: clang-tools-extra/clangd/index/Background.cpp:313
+    // we don't even know what absolute path they should fall in.
+    if (HadErrors && !IGN.IsTU)
+      continue;
----------------
kadircet wrote:
> sammccall wrote:
> > Maybe add a FIXME that we should store other contents too, but only if the current shard contents are missing or also had errors.
> > 
> > 
> I agree with storing contents if they are missing, but does it make sense to replace one broken shard information with other?
I'd say it makes sense if the content has changed.

i.e:
```
bool replace() {
  if old == null
    return true
  if !new.isTU && new.errors && !old.errors
    return false
  return new.digest != old.digest
}
```

(don't let this block you landing it, up to you)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63986





More information about the cfe-commits mailing list