summaryrefslogtreecommitdiff
path: root/odb/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/parser.cxx')
-rw-r--r--odb/parser.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/odb/parser.cxx b/odb/parser.cxx
index 719a3d2..d02de78 100644
--- a/odb/parser.cxx
+++ b/odb/parser.cxx
@@ -942,9 +942,10 @@ collect (tree ns)
if (!DECL_IS_BUILTIN (decl) || DECL_NAMESPACE_STD_P (decl))
{
+ tree dn (DECL_NAME (decl));
+
if (trace)
{
- tree dn (DECL_NAME (decl));
char const* name (dn ? IDENTIFIER_POINTER (dn) : "<anonymous>");
ts << "namespace " << name << " at "
@@ -952,7 +953,12 @@ collect (tree ns)
<< DECL_SOURCE_LINE (decl) << endl;
}
- collect (decl);
+ // Skip anonymous namespaces (there could be nothing of interest to us
+ // inside but they wreck havoc with our attempts to sort declarations
+ // into namespaces).
+ //
+ if (dn != 0)
+ collect (decl);
}
}
}