diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:57 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:57 +0000 |
commit | a59d20b135bfde058a5a69045bab5ec4e2553f74 (patch) | |
tree | 315b8539cc8af111d5cfc6d843ca040f974cc0f3 /lib/AST/DeclPrinter.cpp | |
parent | f978059b82db8c0d849c5f992036210b5ca53200 (diff) |
Print NamedDecls directly to a raw_ostream where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 33ddd5af41..5a6686d164 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -335,8 +335,7 @@ void DeclPrinter::VisitTypedefDecl(TypedefDecl *D) { } void DeclPrinter::VisitTypeAliasDecl(TypeAliasDecl *D) { - Out << "using " << D->getNameAsString() << " = " - << D->getUnderlyingType().getAsString(Policy); + Out << "using " << *D << " = " << D->getUnderlyingType().getAsString(Policy); } void DeclPrinter::VisitEnumDecl(EnumDecl *D) { @@ -600,7 +599,7 @@ void DeclPrinter::VisitFieldDecl(FieldDecl *D) { } void DeclPrinter::VisitLabelDecl(LabelDecl *D) { - Out << D->getNameAsString() << ":"; + Out << *D << ":"; } @@ -761,7 +760,7 @@ void DeclPrinter::PrintTemplateParameters( if (TTP->isParameterPack()) Out << "... "; - Out << TTP->getNameAsString(); + Out << *TTP; if (Args) { Out << " = "; |