semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 14 Nov 2014 16:59:52 +0000 (16:59 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 14 Nov 2014 16:59:52 +0000 (16:59 +0000)
commit234bef96a1cff5d8ad577777fae051105ec01b6e
treebb9b15a5c0dabd6abb40f5da82c60cf13379472d
parent2c59c2d1a2c4903513e6978655eac9159912762d
semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.

2014-11-14  Paolo Carlini  <paolo.carlini@oracle.com>

* semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
* parser.c (cp_parser_omp_clause_collapse): Likewise.
(cp_parser_enumerator_definition): Don't call
instantiate_non_dependent_expr...
* decl.c (build_enumerator): ... call fold_non_dependent_expr here.
* typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
* constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
the final gcc_assert.

* constexpr.c (fold_non_dependent_expr): Add.
* cp-tree.h (fold_non_dependent_expr): Declare it.
* call.c (null_ptr_cst_p): Use it.
* pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
* semantics.c (begin_maybe_infinite_loop): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
* typeck2.c (check_narrowing): Likewise.

* pt.c (fold_non_dependent_expr): Rename to
instantiate_non_dependent_expr.
(fold_non_dependent_expr_sfinae): Rename to
instantiate_non_dependent_expr_sfinae.
(convert_nontype_argument, build_non_dependent_expr): Adjust.
* decl.c (compute_array_index_type): Likewise.
* parser.c (cp_parser_parenthesized_expression_list,
cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
Likewise.
* semantics.c (end_maybe_infinite_loop, finish_static_assert):
Likewise.
* typeck.c (cxx_alignas_expr): Likewise.
* typeck2.c (store_init_value, massage_init_elt): Likewise.
* call.c: Adjust comments.
* class.c: Likewise.
* constexpr.c: Likewise.
* decl2.c: Likewise.
* tree.c: Likewise.

From-SVN: r217577
13 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/cp/typeck2.c