summaryrefslogtreecommitdiff
path: root/odb/processor.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-01-19 10:11:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-01-19 10:11:49 +0200
commitb56b9c6796d8853758f0f5967488260d61b788e2 (patch)
treec20c08a1ed94330101a25a7a626f5b523134f19b /odb/processor.cxx
parent85cf21db471a4ea9549f3b6f2384578b286dfc23 (diff)
Prevent inner self-typedefs from causing scope cycles
Diffstat (limited to 'odb/processor.cxx')
-rw-r--r--odb/processor.cxx22
1 files changed, 16 insertions, 6 deletions
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<namespace_*> (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<namespace_*> (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;