]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: preserve location through constexpr
authorJason Merrill <jason@redhat.com>
Sat, 28 Aug 2021 04:40:29 +0000 (00:40 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 30 Aug 2021 21:23:38 +0000 (17:23 -0400)
commit729f6881cfcc6df3c15a1dd4ebd45bc46bb8f3e9
treed84d97a93a53a93c5ff8e288eb043a0abba7ba40
parenta8de832470f78a40a0e2c8de866a471bf74bf0ab
c++: preserve location through constexpr

While working on the patch for PR101460, I noticed that we were losing the
expression location when folding class prvalue expressions.  The final patch
doesn't fold class prvalues, but this still seems a worthwhile change.  I
don't add location wrappers for scalar prvalues because many callers are
trying to fold them away.

gcc/cp/ChangeLog:

* constexpr.c (cxx_eval_outermost_constant_expr): Copy
expr location to result.
gcc/cp/constexpr.c