+2019-08-02 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2019-08-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.
+ * pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__
+ inside a template function value-dependent.
+
2019-07-19 Jason Merrill <jason@redhat.com>
PR c++/90098 - partial specialization and class non-type parms.
if (DECL_HAS_VALUE_EXPR_P (expression))
{
tree value_expr = DECL_VALUE_EXPR (expression);
- if (value_dependent_expression_p (value_expr))
+ if (value_dependent_expression_p (value_expr)
+ /* __PRETTY_FUNCTION__ inside a template function is dependent
+ on the name of the function. */
+ || (DECL_PRETTY_FUNCTION_P (expression)
+ /* It might be used in a template, but not a template
+ function, in which case its DECL_VALUE_EXPR will be
+ "top level". */
+ && value_expr == error_mark_node))
return true;
}
return false;