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>
{
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));
changed = true;
vec_safe_push (vec, elt);
}
- tree r = t;
if (changed)
r = build_tree_list_vec (vec);
release_tree_vector (vec);
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,
&& 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;
}