aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment.
Trying to help get this review going again as it impacts libc++. ================ Comment at: clang/lib/AST/ExprConstant.cpp:1584-1585 Designator = SubobjectDesignator(getType(B)); + if (!LExpr) + LExpr = B.dyn_cast<const Expr *>(); IsNullPtr = false; ---------------- Should we be asserting that `LExpr` is null? ================ Comment at: clang/lib/AST/ExprConstant.cpp:8049 + bool evaluate(const Expr *E) { + Result.LExpr = E; ---------------- It's not super clear to me when consumers should call `Evaluate()` instead of calling `Visit()`. Some comments on the function may help make it more clear. ================ Comment at: clang/lib/AST/ExprConstant.cpp:8050 + bool evaluate(const Expr *E) { + Result.LExpr = E; + return Visit(E); ---------------- Should we be asserting that `Result.LExpr` is not already set? ================ Comment at: clang/lib/AST/ExprConstant.cpp:8586 + bool evaluate(const Expr *E) { return Visit(E); } + ---------------- Is there a reason we're not setting `Result.LExpr` here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103395/new/ https://reviews.llvm.org/D103395 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits