[clang] Diagnose noreturn calls from a const or pure function (PR #206134)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 08:35:27 PDT 2026
AaronBallman wrote:
> Yes, passing a null pointer to that would be UB. But you don't know whether null will be passed or not, so it can be well-defined. (Esp. if you consider an argument-independent assert. Like an assert that all switch cases were covered, which is actually unreachable.)
Yeah, this is going to be tricky because I can see arguments for and against.
FWIW, I do not plan to pick this one back up any time soon due to bandwidth (I picked this one up because it seemed straightforward and I was already in the vicinity because of https://github.com/llvm/llvm-project/pull/205881).
https://github.com/llvm/llvm-project/pull/206134
More information about the cfe-commits
mailing list