[clang] [Clang] Fixed a crash when instantiating an invalid out-of-line static data member definition in a local class (PR #196772)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sun May 10 05:24:57 PDT 2026


zyn0217 wrote:

> I think this is a timing issue: when parsing function f, A only reports an error but doesn't mark it as invalid. 

This is not a timing issue, but where the problem happens. You should invalidate the decl as soon as it gets diagnosed, rather than deferring them to the instantiation.

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


More information about the cfe-commits mailing list