aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index ff372206ee6..baefdb2fcf4 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2748,6 +2748,24 @@ cast_valid_in_integral_constant_expression_p (tree type)
|| type == error_mark_node);
}
+/* Clean the C++ specific parts of the tree T. */
+
+void
+cp_reset_lang_specifics (tree t)
+{
+ if (TREE_CODE (t) == METHOD_TYPE
+ || TREE_CODE (t) == FUNCTION_TYPE)
+ {
+ /* Default args are not interesting anymore. */
+ tree argtypes = TYPE_ARG_TYPES (t);
+ while (argtypes)
+ {
+ TREE_PURPOSE (argtypes) = 0;
+ argtypes = TREE_CHAIN (argtypes);
+ }
+ }
+}
+
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that some language-specific thing hanging off a tree