ilya-biryukov added a comment.

Is there a way to still enable include insertion but in a restricted manner, 
e.g. only for the current project?
File of canonical declaration is usually a pretty good guess and it would be 
nice to have it. Maybe we could allowing to disable the include insertion via a 
flag or config parameter rather than disabling it for dynamic index entirely.

It bugs me that internal STL headers are added all the time, but it also lets 
me test the feature without building the static index. I find the second more 
valuable, given that we're still actively working on it.



================
Comment at: clangd/index/FileIndex.cpp:18
 
-const CanonicalIncludes *canonicalIncludesForSystemHeaders() {
-  static const auto *Includes = [] {
----------------
Should we also remove the mutex from `CanonicalIncludes` now?


================
Comment at: clangd/index/SymbolCollector.cpp:172
+
+  auto U = toURI(SM, SM.getFilename(Loc), Opts);
+  if (!U)
----------------
Maybe simplify to `return toURI(...)`?
Or is there a reason why it doesn't work?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43550



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to