ASDenysPetrov added a comment. In D126481#3818769 <https://reviews.llvm.org/D126481#3818769>, @martong wrote:
> Yeah okay. I get it now. Thank you for your patience and your time on > elaborating the issue. > > First, I think we'd need to fabricate a test case that shows us the bug even > without applying your patch (D103096 <https://reviews.llvm.org/D103096>). > > Then we can iterate onto the solution. What we could do is to collect the > constants and types on the way of the cast visitation and then apply the same > logic that you have in D103096 <https://reviews.llvm.org/D103096>. Suppose we have found the way to handle it. But what if we find a contradiction while simplifying, like `(short)(int x) = 0` and `(int x) = 1`. So that we would already know that it is impossible. What `SVal` should we return in such case? Undef? Unknown? Original one? > But then there is an open question: what should we do if there is another > kind of symbol in the chain of SymbolCasts? E.g SymbolCast, UnarySymExpr, > SymbolCast. IMO, it doesn't matter, since we are just waiting for a constant. Doesn't matter to what `Sym` it is associated. The main question, as I said, what we shall do with two different constants. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126481/new/ https://reviews.llvm.org/D126481 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits