[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 17 08:13:12 PST 2020
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Fantastic, thanks so much!
================
Comment at: clang-tools-extra/clangd/index/Merge.cpp:129
+ StaticContainsFile{Static->indexedFiles()}
+ ](llvm::StringRef FileURI) mutable {
+ return DynamicContainsFile(FileURI) || StaticContainsFile(FileURI);
----------------
Currently the signature says that the returned function is not const/threadsafe.
If you prefer, you can have it be `unique_function<bool(StringRef) const>`, then the contract is that it's const/threadsafe and you don't need `mutable` here.
Up to you though, I can't think of a case where we *need* it to be threadsafe.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93393/new/
https://reviews.llvm.org/D93393
More information about the cfe-commits
mailing list