* 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 9dbb215154e59826737599356a47a5d67bb11b24..8759dc26642e4d62d94e7a0d1a42e374980d8fdf 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 eef9e2f645df9208997e21d068fa6c9bbde8efae..ef243f6bf0a764aac0fc60998348cd3f83972c29 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)