[clang] [Clang] Ignore assumptions with side effects at compile time (PR #85534)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 17 15:10:21 PDT 2024
Sirraide wrote:
> Is it expected that a failed assumption with side effects does not result in an error?
Yes, because it can’t evaluate the assumption without causing side effects, so the assumption isn’t checked at all; I’ve thought about this a bit too, but unless there’s already some way to evaluate an expression at compile time w/o causing any side-effects (neither at runtime nor at compile time), then this is probably the best we can do.
As an aside, GCC also checks assumptions at compile time, and it too ignores assumptions that might have side effects at compile time.
https://github.com/llvm/llvm-project/pull/85534
More information about the cfe-commits
mailing list