summaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-01-22 12:23:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-01-22 12:23:20 +0200
commit78fb7c04ec8825dba7f83d49c8d04853479bba81 (patch)
tree92ef66846fdf91fac96ee5de54dc8ccdb8b35f76 /odb/context.cxx
parent299f76e0fb8621272f983c2f8110185942d3db7e (diff)
Release version 2.5.0-b.25+12.5.0-b.25+1
Backport the following commits from 2.5.0-b.26: - Prevent inner self-typedefs from causing scope cycles. - Skip declarations inside anonymous namespaces. - Support integer template parameters in parser::emit_type_name(). - Make sure configuration report variables are set in skeleton mode. - Make GCC plugin directory, g++ executable name customizable.
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index dd4019a..13fc1b3 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -1472,7 +1472,7 @@ utype (semantics::data_member& m,
}
}
- if (s->global_scope ())
+ if (!s->named_p () || s->global_scope ())
break;
}
@@ -1882,8 +1882,13 @@ schema (semantics::scope& s) const
namespace_* ns (dynamic_cast<namespace_*> (ps));
- if (ns == 0)
- continue; // Some other scope.
+ if (ns == 0) // Some other scope.
+ {
+ if (!ps->named_p ())
+ break;
+
+ continue;
+ }
if (ns->extension ())
ns = &ns->original ();
@@ -1920,7 +1925,8 @@ schema (semantics::scope& s) const
n.swap (r);
}
- if (r.fully_qualified () || ns->global_scope ())
+ if (r.fully_qualified () ||
+ ns->global_scope ()) // Note: namespaces always named.
break;
}
@@ -1952,8 +1958,13 @@ table_name_prefix (semantics::scope& s) const
namespace_* ns (dynamic_cast<namespace_*> (ps));
- if (ns == 0)
- continue; // Some other scope.
+ if (ns == 0) // Some other scope.
+ {
+ if (!ps->named_p ())
+ break;
+
+ continue;
+ }
if (ns->extension ())
ns = &ns->original ();
@@ -1964,7 +1975,7 @@ table_name_prefix (semantics::scope& s) const
r = n.uname () + r;
}
- if (ns->global_scope ())
+ if (ns->global_scope ()) // Note: namespaces always named.
break;
}