From 12a1162072eef9b6cdf07a3e3889def18a836221 Mon Sep 17 00:00:00 2001 From: Nathaniel Shead Date: Thu, 13 Jul 2023 17:40:10 -0400 Subject: [PATCH] c++: style tweak At this point r == t, but it makes more sense to refer to t like all the other cases do. gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_constant_expression): Pass t to get_value. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 9f96a6c41ea..c6f323ebf43 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -7085,7 +7085,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, case PARM_DECL: if (lval && !TYPE_REF_P (TREE_TYPE (t))) /* glvalue use. */; - else if (tree v = ctx->global->get_value (r)) + else if (tree v = ctx->global->get_value (t)) r = v; else if (lval) /* Defer in case this is only used for its type. */;