summaryrefslogtreecommitdiff
path: root/odb/semantics/elements.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/semantics/elements.cxx')
-rw-r--r--odb/semantics/elements.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx
index fba9b9b..b5793d0 100644
--- a/odb/semantics/elements.cxx
+++ b/odb/semantics/elements.cxx
@@ -56,7 +56,7 @@ namespace semantics
if (p == &s)
return true;
- if (p->global_scope ())
+ if (!p->named_p () || p->global_scope ())
break;
}
@@ -476,7 +476,7 @@ namespace semantics
// Look in the outer scope unless requested not to or if this is
// the global scope.
//
- if ((flags & exclude_outer) == 0 && !global_scope ())
+ if ((flags & exclude_outer) == 0 && named_p () && !global_scope ())
return scope ().lookup (name, ti, flags, hidden);
return 0;