re PR c++/56238 (ICE in tree check: expected record_type or union_type or qual_union_type, have template_type_parm in lookup_conversions, at cp/search.c:2515)

PR c++/56238
	* pt.c (fold_non_dependent_expr_sfinae): Check
	instantiation_dependent_expression_p.

From-SVN: r196724
This commit is contained in:
Jason Merrill 2013-03-16 22:34:03 -04:00 committed by Jason Merrill
parent 98e8112376
commit 011ce3f3c2
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2013-03-16 Jason Merrill <jason@redhat.com>
PR c++/56238
* pt.c (fold_non_dependent_expr_sfinae): Check
instantiation_dependent_expression_p.
PR c++/56095
* class.c (resolve_address_of_overloaded_function): Accept a
reference to function for target_type.

View File

@ -5044,9 +5044,8 @@ fold_non_dependent_expr_sfinae (tree expr, tsubst_flags_t complain)
as two declarations of the same function, for example. */
if (processing_template_decl
&& !type_dependent_expression_p (expr)
&& potential_constant_expression (expr)
&& !value_dependent_expression_p (expr))
&& !instantiation_dependent_expression_p (expr)
&& potential_constant_expression (expr))
{
HOST_WIDE_INT saved_processing_template_decl;