malaperle added subscribers: ioeric, sammccall, malaperle.
malaperle added a comment.
I think this might have broken the "shared lib" build? Could you double check
that you don't need to add "clangDriver" ?
../tools/clang/tools/extra/clangd/index/CanonicalIncludes.cpp:61: error:
undefined refer
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333188: [clangd] Skip .inc headers when canonicalizing
header #include. (authored by ioeric, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D47187
ioeric updated this revision to Diff 148218.
ioeric marked 3 inline comments as done.
ioeric added a comment.
- addressed comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47187
Files:
clangd/index/CanonicalIncludes.cpp
clangd/index/CanonicalIncludes.h
clangd/index
sammccall added inline comments.
Comment at: clangd/index/CanonicalIncludes.cpp:54
+ StringRef Header = *I;
+ if (!isLiteralInclude(Header)) {
+// If Header is not expected be included (e.g. .cc file), we fall back to
headers are paths, not , right?
=
ioeric added inline comments.
Comment at: clangd/index/SymbolCollector.cpp:209
+ while (true) {
+if (!Loc.isValid() || SM.isInMainFile(Loc))
+ break;
sammccall wrote:
> (as above, maybe want to include the main file for simplicity/symmetry)
Thanks! As y
ioeric updated this revision to Diff 148189.
ioeric marked 4 inline comments as done.
ioeric added a comment.
- Include main file in the include stack when mapping headers.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D47187
Files:
clangd/index/CanonicalIncludes.cpp
clangd
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
n
Comment at: clangd/index/CanonicalIncludes.cpp:50
+ if (I == Headers.end())
+return Headers[0]; // Fallback to the defining header.
+ llvm::StringRef Header = *
ioeric created this revision.
ioeric added a reviewer: sammccall.
Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov, klimek.
This assumes that .inc files are supposed to be included via headers
that include them.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org