================ @@ -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) { ---------------- necto wrote:
The reason is the same as for `SymbolData::Sym` that it also a unique single integer identifying a `SymbolData`: it is not available until you allocate the symbol. The only use of `SymExpr::Profile` I observed is for `SymbolManager` to avoid reallocating identical SymExprs, for which it keeps track of all SymExprs allocated and allocates a new one only when necessary. But for that it needs to identify identical SymExprs before they are allocated. https://github.com/llvm/llvm-project/pull/121347 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits