summaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 1afd9edffec..64456b49699 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -1608,6 +1608,15 @@ namespace_bindings_p (void)
return b->kind == sk_namespace;
}
+/* True if the innermost non-class scope is a block scope. */
+
+bool
+local_bindings_p (void)
+{
+ cp_binding_level *b = innermost_nonclass_level ();
+ return b->kind < sk_function_parms || b->kind == sk_omp;
+}
+
/* True if the current level needs to have a BLOCK made. */
bool