diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-02 05:58:29 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-02 05:58:29 +0000 |
commit | abe1a398e33bac03596116c97a7375d074101903 (patch) | |
tree | 4cbee2b550744448b941c9d4b670dd7d565746ff /clang/lib/AST/Decl.cpp | |
parent | 1ecad2c993a94fca00a713a0ae6665bb40758fb8 (diff) | |
download | bcm5719-llvm-abe1a398e33bac03596116c97a7375d074101903.tar.gz bcm5719-llvm-abe1a398e33bac03596116c97a7375d074101903.zip |
Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda at ... )')
For namespaces, this is consistent with mangling and GCC's debug info
behavior. For structs, GCC uses <anonymous struct> but we prefer
consistency between all anonymous entities but don't want to confuse
them with template arguments, etc, so we'll just go with parens in all
cases.
llvm-svn: 205398
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index c2e1a848c13..83cbb44f7f9 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1303,12 +1303,12 @@ void NamedDecl::printQualifiedName(raw_ostream &OS, P); } else if (const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(*I)) { if (ND->isAnonymousNamespace()) - OS << "<anonymous namespace>"; + OS << "(anonymous namespace)"; else OS << *ND; } else if (const RecordDecl *RD = dyn_cast<RecordDecl>(*I)) { if (!RD->getIdentifier()) - OS << "<anonymous " << RD->getKindName() << '>'; + OS << "(anonymous " << RD->getKindName() << ')'; else OS << *RD; } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) { @@ -1341,7 +1341,7 @@ void NamedDecl::printQualifiedName(raw_ostream &OS, if (getDeclName()) OS << *this; else - OS << "<anonymous>"; + OS << "(anonymous)"; } void NamedDecl::getNameForDiagnostic(raw_ostream &OS, |