[Lldb-commits] [clang] [lldb] [Modules] Handle decl attributes on deserialization the same as during parsing. (PR #208348)
Volodymyr Sapsai via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 20 13:59:27 PDT 2026
================
----------------
vsapsai wrote:
I'd like to get @AaronBallman opinion on the change in `Parser::Initialize` API. Separating initialization from `ConsumeToken` is driven by the need to initialize the parser before `ExternalASTSource::StartTranslationUnit` which can start deserializing decls [and using Sema]. Calling `ConsumeToken` explicitly is somewhat clunky but doesn't seem like a terribly complicated API.
In general, I believe it is reasonable for `StartTranslationUnit` to assume that all other components have been initialized when it is called. And I think it is debatable to start actual work during initialization. I believe moving `ConsumeToken` out of `Parser::Initialize` makes the code easier to compose and not to rely on a specific order of calls so much.
https://github.com/llvm/llvm-project/pull/208348
More information about the lldb-commits
mailing list