NagyDonat wrote:

Offtopic @Xazax-hun
> there are many ways to get to undef during constant folding (signed overflows 
> ...

I was surprised to read this because as far as I know (knew) the analyzer 
models signed operations as if overflow was completely natural for them. (See 
e.g. the method `assumeInBound` which IIRC relies on this to convert a "within 
this interval" check to a ">= some threshold" check. I also vaguely recall that 
there are many FPs where the analyzer assumes wraparond of signed values.)

I would be very grateful if somebody pointed out some logic in the analyzer 
source which ensures that a signed overflow produces an `UndefinedVal` (or the 
overflow is disallowed by some other mechanism). If I was right and we don't 
have such code yet, then it might be good to add some...

https://github.com/llvm/llvm-project/pull/114222
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to