[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 29 10:32:54 PDT 2025


vsapsai wrote:

> Not really, using `LangOptions` directly instead of `std::unique_ptr<LangOptions>` allows reassignment too. I chose `std::unique_ptr` to:
> 
> * prevent increase of `ASTUnit` size,
> * avoid unconditional initialization of `ASTUnit::LangOpts` in the constructor (which would be an unnecessary change in this PR I think).

I think that is a reasonable choice.

https://github.com/llvm/llvm-project/pull/137675


More information about the cfe-commits mailing list