[PATCH] D158967: [clangd] Record the stack bottom before building AST

Younan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 04:26:29 PDT 2023


zyounan added a comment.

> `clang::ParseAST` or `ASTFrontendAction::ExecuteAction` look like good candidates to me.

We had already placed the initialization in ASTFrontendAction::ExecuteAction <https://github.com/llvm/llvm-project/blob/985e399647d591d6130ba6fe08c5b5f6cb87d9f6/clang/lib/Frontend/CompilerInstance.cpp#L1013-L1016>, but we don't have such if we prefer invoking the action outside the libclang. (Just as what we're doing now at the clangd site.)

I'm not 100% sure if `clang::ParseAST` is appropriate since this might cause a side effect to the global state. Would this break the encapsulation hierarchy?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158967



More information about the cfe-commits mailing list