Timm =?utf-8?q?Bäder?= <tbae...@redhat.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/117...@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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits