From 83afe9b528896ba26d774839c930098f4833cb87 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 3 Apr 2018 13:41:17 -0400 Subject: [PATCH] * semantics.c (finish_if_stmt_cond): Use instantiation_dependent_expression_p. From-SVN: r259044 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/semantics.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9dbb215154e..8759dc26642 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2018-04-03 Jason Merrill + * semantics.c (finish_if_stmt_cond): Use + instantiation_dependent_expression_p. + PR c++/85149 - generic lambda and constexpr if. * pt.c (build_extra_args, add_extra_args): Split from tsubst_pack_expansion. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index eef9e2f645d..ef243f6bf0a 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -733,7 +733,7 @@ finish_if_stmt_cond (tree cond, tree if_stmt) if (IF_STMT_CONSTEXPR_P (if_stmt) && !type_dependent_expression_p (cond) && require_constant_expression (cond) - && !value_dependent_expression_p (cond) + && !instantiation_dependent_expression_p (cond) /* Wait until instantiation time, since only then COND has been converted to bool. */ && TREE_TYPE (cond) == boolean_type_node) -- 2.30.2