[clang] [clang][analyzer] Stabilize path-constraint order by using alloc IDs (PR #121347)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 31 00:30:56 PST 2024
================
@@ -427,8 +434,8 @@ class BinarySymExprImpl : public BinarySymExpr {
public:
BinarySymExprImpl(LHSTYPE lhs, BinaryOperator::Opcode op, RHSTYPE rhs,
- QualType t)
- : BinarySymExpr(ClassKind, op, t), LHS(lhs), RHS(rhs) {
+ QualType t, AllocIDType AllocID)
+ : BinarySymExpr(ClassKind, op, t, AllocID), LHS(lhs), RHS(rhs) {
----------------
steakhal wrote:
In all of these SymExprs, we now have an AllocID - that is unique to the object we allocated.
So, why couldn't we just simplify all of the Profile functions of these with a unified impl at the SymExpr level, just "hashing" that AllocID only.
I feel like I'm coming back to this question all the time, and if you have something for it then we could formalize a comment at the Profile and/or at the AllocID data field to explain this "redundancy".
https://github.com/llvm/llvm-project/pull/121347
More information about the cfe-commits
mailing list