From: Jason Merrill Date: Wed, 15 Sep 2021 23:01:14 +0000 (-0400) Subject: c++: Small location tweak X-Git-Tag: basepoints/gcc-13~4751 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d970817a5892b6bb4634499d47f6d2ee7d46e4c;p=thirdparty%2Fgcc.git c++: Small location tweak As Marek suggested. gcc/cp/ChangeLog: * constexpr.c (cxx_eval_outermost_constant_expr): Use protected_set_expr_location. --- diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index d3c075c5ab84..8a5dd067bcb3 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -7502,8 +7502,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, /* Remember the original location if that wouldn't need a wrapper. */ if (location_t loc = EXPR_LOCATION (t)) - if (CAN_HAVE_LOCATION_P (r)) - SET_EXPR_LOCATION (r, loc); + protected_set_expr_location (r, loc); return r; }