Commit dba99244 by Marek Polacek Committed by Marek Polacek

* constexpr.c (fold_simple): Simplify.

From-SVN: r256899
parent 2af64836
2018-01-19 Marek Polacek <polacek@redhat.com>
* constexpr.c (fold_simple): Simplify.
2018-01-18 Jason Merrill <jason@redhat.com> 2018-01-18 Jason Merrill <jason@redhat.com>
PR c++/83714 PR c++/83714
......
...@@ -4931,22 +4931,21 @@ fold_simple_1 (tree t) ...@@ -4931,22 +4931,21 @@ fold_simple_1 (tree t)
} }
/* If T is a simple constant expression, returns its simplified value. /* If T is a simple constant expression, returns its simplified value.
Otherwise returns T. In contrast to maybe_constant_value do we Otherwise returns T. In contrast to maybe_constant_value we
simplify only few operations on constant-expressions, and we don't simplify only few operations on constant-expressions, and we don't
try to simplify constexpressions. */ try to simplify constexpressions. */
tree tree
fold_simple (tree t) fold_simple (tree t)
{ {
tree r = NULL_TREE;
if (processing_template_decl) if (processing_template_decl)
return t; return t;
r = fold_simple_1 (t); tree r = fold_simple_1 (t);
if (!r) if (r)
r = t; return r;
return r; return t;
} }
/* If T is a constant expression, returns its reduced value. /* If T is a constant expression, returns its reduced value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment