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/processor.cxx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'odb/processor.cxx') diff --git a/odb/processor.cxx b/odb/processor.cxx index 9cda5e6..d48baa7 100644 --- a/odb/processor.cxx +++ b/odb/processor.cxx @@ -2194,8 +2194,13 @@ namespace namespace_* ns (dynamic_cast (s)); - if (ns == 0) - continue; // Some other scope. + if (ns == 0) // Some other scope. + { + if (!s->named_p ()) + break; + + continue; + } if (ns->extension ()) ns = &ns->original (); @@ -2207,7 +2212,7 @@ namespace break; } - if (ns->global_scope ()) + if (ns->global_scope ()) // Note: namespaces always named. break; } @@ -2702,15 +2707,20 @@ namespace namespace_* ns (dynamic_cast (s)); - if (ns == 0) - continue; // Some other scope. + if (ns == 0) // Some other scope. + { + if (!s->named_p ()) + break; + + continue; + } if (ns->extension ()) ns = &ns->original (); if (!ns->count ("pointer")) { - if (ns->global_scope ()) + if (ns->global_scope ()) // Note: namespace always named. break; else continue; -- cgit v1.1