================
@@ -491,6 +510,11 @@ SVal SimpleSValBuilder::evalBinOpNN(ProgramStateRef state,
rhs.castAs<nonloc::LocAsInteger>().getLoc(),
resultTy);
case nonloc::ConcreteIntKind: {
+ // Preserve the location for identity operations.
+ if (isIdentityOperation(op,
+ rhs.castAs<nonloc::ConcreteInt>().getValue()))
+ return evalCast(lhs, resultTy, QualType{});
+
----------------
steakhal wrote:
This makes me wonder if we want to do this canonicalization at more places. Is
this the only place where it makes sense? I wonder if the swapped operand case
is handled.
https://github.com/llvm/llvm-project/pull/225048
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits