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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 26 06:16:36 PDT 2019


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 `D->getASTContext().getSourceManager()`.


================
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.
----------------
nit: This comment just repeats the code, I think the comment describe why we need to do this check (because of the template instantiation?)  


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