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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to