]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: style tweak
authorNathaniel Shead <nathanieloshead@gmail.com>
Thu, 13 Jul 2023 21:40:10 +0000 (17:40 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 14 Jul 2023 22:41:39 +0000 (18:41 -0400)
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 <nathanieloshead@gmail.com>
gcc/cp/constexpr.cc

index 9f96a6c41eaf663e77c2df10ea7f4ba607fec8f2..c6f323ebf43a8cb0a6ab6c9398c18f5b36bfa3e5 100644 (file)
@@ -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.  */;