diff options
author | Brad King <brad.king@kitware.com> | 2015-05-15 18:44:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-15 18:45:32 (GMT) |
commit | 29edb122e53ee80201a7e535f6e26f161de86a47 (patch) | |
tree | ed52862f8c48dcd84f0c1f3bec4ffd3de3c72fe7 /src | |
parent | 40aed5c681c2355614d00b77f9eb372a77fa6a30 (diff) | |
download | CastXML-29edb122e53ee80201a7e535f6e26f161de86a47.zip CastXML-29edb122e53ee80201a7e535f6e26f161de86a47.tar.gz CastXML-29edb122e53ee80201a7e535f6e26f161de86a47.tar.bz2 |
Output: Do not generate name="" attribute on anonymous namespaces
Be consistent with gccxml which did not generate the attribute.
Diffstat (limited to 'src')
-rw-r--r-- | src/Output.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Output.cxx b/src/Output.cxx index 374f1c3..709c5b8 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -1373,7 +1373,10 @@ void ASTVisitor::OutputNamespaceDecl( { this->OS << " <Namespace"; this->PrintIdAttribute(dn); - this->PrintNameAttribute(d->getName().str()); + std::string name = d->getName().str(); + if (!name.empty()) { + this->PrintNameAttribute(name); + } this->PrintContextAttribute(d); if(dn->Complete) { std::set<DumpId> emitted; |