[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 25 00:56:35 PDT 2018

ioeric added a comment.

Nice! This looks good to me. Just some nits. I'll let Sam stamp.

Comment at: clangd/ClangdUnit.h:81
   ASTContext &getASTContext();
   const ASTContext &getASTContext() const;
IIUC, `ASTContext` in a `ParsedAST` may not contain information from preambles and thus may give an incomplete AST. If so, I think we should make this more explicit in the class level to make sure this is not misused (e.g. in case the incomplete context is used to build dynamic index).

Comment at: clangd/ClangdUnit.h:119
   std::vector<Diag> Diags;
   std::vector<const Decl *> TopLevelDecls;
   std::vector<Inclusion> Inclusions;
nit: also rename this and add comment?

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list