aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-05-18 13:43:18 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-05-18 13:43:18 -0400
commit8f74423d5b0f6a9508a0be50a6de291913bb0baf (patch)
tree5b0f51959f869b34fb04dab4396de3dcfe7f6b1a /gcc
parent04643334f9769263db3a2f71956876886ef6cdd5 (diff)
downloadgcc-8f74423d5b0f6a9508a0be50a6de291913bb0baf.zip
gcc-8f74423d5b0f6a9508a0be50a6de291913bb0baf.tar.gz
gcc-8f74423d5b0f6a9508a0be50a6de291913bb0baf.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c17
2 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f459e50..81baa89 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-18 Jason Merrill <jason@redhat.com>
+
+ * pt.c (value_dependent_expression_p): Tweak new cases to better
+ match the wording in the standard.
+
2016-05-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/69793
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 65bfd42..fde3091 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: