[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325764: [clangd] Not collect include headers for dynamic index for now. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.cpp:18 -const CanonicalIncludes *canonicalIncludesForSystemHeaders() { - static const auto *Includes = [] { ilya-biryukov wrote: > Should we also remove the mutex from `CanonicalIncludes` now? I

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 135244. ioeric marked 2 inline comments as done. ioeric added a comment. Properly use toURI. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43550 Files: clangd/CodeComplete.cpp clangd/index/FileIndex.cpp clangd/index/Index.h

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. As discussed offline, properly supporting IWYU pragma in the dynamic index seems like too much design work for now and it's not gonna get fixed soon. So opting for disabling the

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D43550#1014319, @ilya-biryukov wrote: > Is there a way to still enable include insertion but in a restricted manner, > e.g. only for the current project? I'm not sure if this is currently supported, as we don't have a good definition of a

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Ilya Biryukov via Phabricator via cfe-commits
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

[PATCH] D43550: [clangd] Not collect include headers for dynamic index for now.

2018-02-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, sammccall, hokein. Herald added subscribers: cfe-commits, jkorous-apple, klimek. The new behaviors introduced by this patch: o When include collection is enabled, we always set IncludeHeader field in Symbol even if it's the