[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 14 21:52:42 PDT 2025
efriedma-quic wrote:
There's one other possibility... you could make "deferred" diagnostics not defer diagnosing quite so much. If the function is defined in a way that it inherently must be emitted, or it's already been odr-used, there's no point to actually deferring the diagnostic: we know we'll emit it eventually. Otherwise, we wait until we see an ODR-use of the function: if we see such a use, we immediately diagnose that use. But I'm not quite sure how you deal with a function that's declared early, then defined inline later in the file; you'd need to recursively scan all the callers of the function.
Sticking a map in the ASTContext is probably okay.
https://github.com/llvm/llvm-project/pull/147163
More information about the cfe-commits
mailing list