aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-07-09 13:50:16 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-07-09 13:50:16 -0400
commit1bf3fe3c6ac33ed15c7502b88d8ce5758ee2b139 (patch)
treead1d0cd50e615155a872cec6e30b2a0f68788332 /gcc/cp
parent5c4e8e5cd4c246e9d5c4dcecdc7cd77d0477584b (diff)
downloadgcc-1bf3fe3c6ac33ed15c7502b88d8ce5758ee2b139.zip
gcc-1bf3fe3c6ac33ed15c7502b88d8ce5758ee2b139.tar.gz
gcc-1bf3fe3c6ac33ed15c7502b88d8ce5758ee2b139.tar.bz2
pt.c (instantiation_dependent_r): Call value_dependent_expression_p.
* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call value_dependent_expression_p. From-SVN: r225622
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/cp/pt.c6
3 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8ebe307..3640cce 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2015-07-09 Jason Merrill <jason@redhat.com>
+ * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
+ value_dependent_expression_p.
+
* cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
template_parameter_pack_p.
* parser.c (declarator_can_be_parameter_pack): False if
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4911096..b5f1af8 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -20788,7 +20788,7 @@ cp_parser_member_declaration (cp_parser* parser)
decl = cp_parser_alias_declaration (parser);
/* Note that if we actually see the '=' token after the
identifier, cp_parser_alias_declaration commits the
- tentative parse. In that case, we really expects an
+ tentative parse. In that case, we really expect an
alias-declaration. Otherwise, we expect a using
declaration. */
alias_decl_expected =
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index d3e9d31..63907ce 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -20131,7 +20131,7 @@ template_for_substitution (tree decl)
}
/* Returns true if we need to instantiate this template instance even if we
- know we aren't going to emit it.. */
+ know we aren't going to emit it. */
bool
always_instantiate_p (tree decl)
@@ -21684,9 +21684,7 @@ instantiation_dependent_r (tree *tp, int *walk_subtrees,
}
case TRAIT_EXPR:
- if (dependent_type_p (TRAIT_EXPR_TYPE1 (*tp))
- || (TRAIT_EXPR_TYPE2 (*tp)
- && dependent_type_p (TRAIT_EXPR_TYPE2 (*tp))))
+ if (value_dependent_expression_p (*tp))
return *tp;
*walk_subtrees = false;
return NULL_TREE;