================
@@ -346,7 +346,7 @@ static std::optional<NonLoc> tryRearrange(ProgramStateRef
State,
if (BinaryOperator::isComparisonOp(Op) && !InBounds(LInt, RInt, LSym, RSym))
return std::nullopt;
- if (LSym == RSym)
+ if (LSym == RSym && Op != BO_Add)
----------------
necto wrote:
I don't know what are the other possibilities for `Op`. It seems that for
comparison and BO_Sub this works well. I guess multiplication and division are
not supported anyway. What about bitwise `BO_And`, `BO_Or`?
https://github.com/llvm/llvm-project/pull/237160
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits