[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 12 06:42:49 PDT 2017


baloghadamsoftware added a comment.

In https://reviews.llvm.org/D35109#806156, @NoQ wrote:

> I think you might also need to convert `APSInt`s to an appropriate type, as done above. Type of right-hand-side `APSInt`s do not necessarily coincide with the type of the left-hand-side symbol or of the whole expression. `APSInt` operations crash when signedness doesn't match (and in a few other cases).


Could you please help me by constructing an example for this scenario? I tried multiple options, but I always failed since I check the type of the two sides, as you proposed. So I need an example where `typeof(A+n) == typeof(B+m)` but `typeof(n) != typeof(m)`.


https://reviews.llvm.org/D35109





More information about the cfe-commits mailing list