[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 26 07:29:42 PDT 2019


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 level decls.
----------------
hokein wrote:
> nit: This comment just repeats the code, I think the comment describe why we need to do this check (because of the template instantiation?)  
Removed the D->isFromASTFile because this if actually covers that as well. Don't know what to do about comments though as it is not only specific to that case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63817/new/

https://reviews.llvm.org/D63817





More information about the cfe-commits mailing list