aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-05-18 13:14:04 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-05-18 13:14:04 -0400
commit8f56fadc243818bb1b89ac6f53c042d81eb03599 (patch)
tree388c6b0cfb69abda1c555402519d1b02ec79d01c /gcc/cp
parent80f1c14df5da32ce83a4eca66ecd5b38d12f458d (diff)
downloadgcc-8f56fadc243818bb1b89ac6f53c042d81eb03599.zip
gcc-8f56fadc243818bb1b89ac6f53c042d81eb03599.tar.gz
gcc-8f56fadc243818bb1b89ac6f53c042d81eb03599.tar.bz2
tree.c (strip_typedefs_expr): Fix typo.
* tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo. (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype. [TREE_LIST]: Fix no-change case. From-SVN: r223300
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/tree.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d4f739c..f5a31fd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2015-05-18 Jason Merrill <jason@redhat.com>
+ * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
+ (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
+ [TREE_LIST]: Fix no-change case.
+
* ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index ec9be8c..eebb415 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1265,6 +1265,7 @@ strip_typedefs (tree t, bool *remove_attributes)
{
bool changed = false;
vec<tree,va_gc> *vec = make_tree_vector ();
+ tree r = t;
for (; t; t = TREE_CHAIN (t))
{
gcc_assert (!TREE_PURPOSE (t));
@@ -1273,7 +1274,6 @@ strip_typedefs (tree t, bool *remove_attributes)
changed = true;
vec_safe_push (vec, elt);
}
- tree r = t;
if (changed)
r = build_tree_list_vec (vec);
release_tree_vector (vec);
@@ -1411,7 +1411,7 @@ strip_typedefs (tree t, bool *remove_attributes)
result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t),
remove_attributes);
if (result == DECLTYPE_TYPE_EXPR (t))
- return t;
+ result = NULL_TREE;
else
result = (finish_decltype_type
(result,
@@ -1496,8 +1496,8 @@ strip_typedefs_expr (tree t, bool *remove_attributes)
&& type2 == TRAIT_EXPR_TYPE2 (t))
return t;
r = copy_node (t);
- TRAIT_EXPR_TYPE1 (t) = type1;
- TRAIT_EXPR_TYPE2 (t) = type2;
+ TRAIT_EXPR_TYPE1 (r) = type1;
+ TRAIT_EXPR_TYPE2 (r) = type2;
return r;
}