This revision was automatically updated to reflect the committed changes.
Closed by commit rL364747: [clangd] No longer getting template instantiations
from header files in Main… (authored by jvikstrom, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Looks good, please update the patch description (in git, and phabricator),
mentioning why the previous solution won't work.
Comment at:
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:47
#include
+#include
NIT: This include is redundant, maybe remove?
Probably added by accident.
Comment at:
jvikstrom marked 3 inline comments as done.
jvikstrom added inline comments.
Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:75
+ if (!SM->isInMainFile(D->getLocation()))
+// This decl comes from another file and should not be included in the
+// top
jvikstrom updated this revision to Diff 206664.
jvikstrom added a comment.
Removed comment, getting SM from Decl and removed old check for checking the
file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63817/new/
https://reviews.llvm.org/D63817
hokein added inline comments.
Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:74
+ if (!SM->isInMainFile(D->getLocation()))
+// This decl comes from another file and should not be included in the
you could get SourceManager from