[C++ PATCH v2] PR c++/92907 - noexcept does not consider "const" in member functions.

Jason Merrill jason@redhat.com
Wed Jan 22 17:26:00 GMT 2020


On 1/22/20 11:33 AM, Marek Polacek wrote:
> Here's what I did.  Unfortunately it doesn't fix PR79620.

No, I wouldn't expect it to, that looks like more of an issue with how 
is_lambda_ignored_entity skips captures in unevaluated context.

> +  cp_cv_quals quals;
> +  if (DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
> +    quals = cp_type_quals (class_of_this_parm (TREE_TYPE (decl)));
> +  else
> +    quals = TYPE_UNQUALIFIED;

This could be

cp_cv_quals quals = type_memfn_quals (TREE_TYPE (decl));

OK with that change.

Jason



More information about the Gcc-patches mailing list