From: Jason Merrill Date: Wed, 18 May 2016 17:43:18 +0000 (-0400) Subject: pt.c (value_dependent_expression_p): Tweak new cases to better match the wording... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f74423d5b0f6a9508a0be50a6de291913bb0baf;p=gcc.git pt.c (value_dependent_expression_p): Tweak new cases to better match the wording in the standard. * pt.c (value_dependent_expression_p): Tweak new cases to better match the wording in the standard. From-SVN: r236421 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f459e50474b..81baa89a30d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-05-18 Jason Merrill + + * pt.c (value_dependent_expression_p): Tweak new cases to better + match the wording in the standard. + 2016-05-18 Paolo Carlini PR c++/69793 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 65bfd42a2e7..fde30919517 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -22649,19 +22649,14 @@ value_dependent_expression_p (tree expression) switch (TREE_CODE (expression)) { case BASELINK: - /* A member function of a dependent class has dependent template - arguments from its class. */ - if (dependent_type_p (BINFO_TYPE (BASELINK_BINFO (expression)))) - return true; - return value_dependent_expression_p (BASELINK_FUNCTIONS (expression)); + /* A dependent member function of the current instantiation. */ + return dependent_type_p (BINFO_TYPE (BASELINK_BINFO (expression))); case FUNCTION_DECL: - /* A function template specialization is value-dependent if it has any - dependent template arguments, since that means it cannot be - instantiated for constexpr evaluation. */ - if (DECL_LANG_SPECIFIC (expression) - && DECL_TEMPLATE_INFO (expression)) - return any_dependent_template_arguments_p (DECL_TI_ARGS (expression)); + /* A dependent member function of the current instantiation. */ + if (DECL_CLASS_SCOPE_P (expression) + && dependent_type_p (DECL_CONTEXT (expression))) + return true; break; case IDENTIFIER_NODE: