[clang] [clang] Format bitfield width diagnostics with thousands-separators (PR #117763)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 10:41:54 PST 2024


Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/117763 at github.com>


AaronBallman wrote:

> > Is the lifetime for the APSInt here OK? When I call `Diag()`, will the be diagnostic emitted immediately? Or does the APSInt need to life longer?
> 
> Iirc that cause problems if e.g. `PDiag` is used since the diagnostic is stored and emitted later.

Yup! Also, we want the ability to batch diagnostics and emit them when it makes the most sense, so I think we want the lifetime of the `APSInt` to be extended to that of the AST context (then it behaves the same as `NamedDecl *`).

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


More information about the cfe-commits mailing list