* semantics.c (finish_if_stmt_cond): Use instantiation_dependent_expression_p.
authorJason Merrill <jason@redhat.com>
Tue, 3 Apr 2018 17:41:17 +0000 (13:41 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 3 Apr 2018 17:41:17 +0000 (13:41 -0400)
From-SVN: r259044

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 9dbb215..8759dc2 100644 (file)
@@ -1,5 +1,8 @@
 2018-04-03  Jason Merrill  <jason@redhat.com>
 
+       * 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.
index eef9e2f..ef243f6 100644 (file)
@@ -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)