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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 7b5a3e4..42194cb 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -539,6 +539,16 @@ build_local_temp (tree type)
return slot;
}
+/* Return whether DECL is such a local temporary. */
+
+bool
+is_local_temp (tree decl)
+{
+ return (VAR_P (decl) && DECL_ARTIFICIAL (decl)
+ && !TREE_STATIC (decl)
+ && DECL_FUNCTION_SCOPE_P (decl));
+}
+
/* Set various status flags when building an AGGR_INIT_EXPR object T. */
static void