Commit 1bf3fe3c by Jason Merrill Committed by Jason Merrill

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
parent 5c4e8e5c
2015-07-09 Jason Merrill <jason@redhat.com> 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 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
template_parameter_pack_p. template_parameter_pack_p.
* parser.c (declarator_can_be_parameter_pack): False if * parser.c (declarator_can_be_parameter_pack): False if
......
...@@ -20788,7 +20788,7 @@ cp_parser_member_declaration (cp_parser* parser) ...@@ -20788,7 +20788,7 @@ cp_parser_member_declaration (cp_parser* parser)
decl = cp_parser_alias_declaration (parser); decl = cp_parser_alias_declaration (parser);
/* Note that if we actually see the '=' token after the /* Note that if we actually see the '=' token after the
identifier, cp_parser_alias_declaration commits 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 alias-declaration. Otherwise, we expect a using
declaration. */ declaration. */
alias_decl_expected = alias_decl_expected =
......
...@@ -20131,7 +20131,7 @@ template_for_substitution (tree decl) ...@@ -20131,7 +20131,7 @@ template_for_substitution (tree decl)
} }
/* Returns true if we need to instantiate this template instance even if we /* 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 bool
always_instantiate_p (tree decl) always_instantiate_p (tree decl)
...@@ -21684,9 +21684,7 @@ instantiation_dependent_r (tree *tp, int *walk_subtrees, ...@@ -21684,9 +21684,7 @@ instantiation_dependent_r (tree *tp, int *walk_subtrees,
} }
case TRAIT_EXPR: case TRAIT_EXPR:
if (dependent_type_p (TRAIT_EXPR_TYPE1 (*tp)) if (value_dependent_expression_p (*tp))
|| (TRAIT_EXPR_TYPE2 (*tp)
&& dependent_type_p (TRAIT_EXPR_TYPE2 (*tp))))
return *tp; return *tp;
*walk_subtrees = false; *walk_subtrees = false;
return NULL_TREE; return NULL_TREE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment