Re: [PATCH] c++: REF_PARENTHESIZED_P wrapper inhibiting NRVO [PR67302]

2021-06-20 Thread Jason Merrill via Gcc-patches
On 6/19/21 3:45 PM, Patrick Palka wrote: Here, in C++14 or later, we remember the parentheses around 'a' in the return statement by using a REF_PARENTHESIZED_P wrapper, which ends up inhibiting NRVO because we don't look through this wrapper before checking the conditions for NRVO. This patch

[PATCH] c++: REF_PARENTHESIZED_P wrapper inhibiting NRVO [PR67302]

2021-06-19 Thread Patrick Palka via Gcc-patches
Here, in C++14 or later, we remember the parentheses around 'a' in the return statement by using a REF_PARENTHESIZED_P wrapper, which ends up inhibiting NRVO because we don't look through this wrapper before checking the conditions for NRVO. This patch fixes this by calling