From b56b9c6796d8853758f0f5967488260d61b788e2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Jan 2024 10:11:49 +0200 Subject: Prevent inner self-typedefs from causing scope cycles --- odb/semantics/elements.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'odb/semantics') 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; -- cgit v1.1