diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-01-19 10:11:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-01-19 10:11:49 +0200 |
commit | b56b9c6796d8853758f0f5967488260d61b788e2 (patch) | |
tree | c20c08a1ed94330101a25a7a626f5b523134f19b /odb/semantics | |
parent | 85cf21db471a4ea9549f3b6f2384578b286dfc23 (diff) |
Prevent inner self-typedefs from causing scope cycles
Diffstat (limited to 'odb/semantics')
-rw-r--r-- | odb/semantics/elements.cxx | 4 |
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; |