diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-22 15:46:01 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-22 15:46:01 +0000 |
commit | 5eada844fa70b6e2bc941dd7306f7a4fb1e8529d (patch) | |
tree | e493a8ac86fbc8e41cbdcdddb70ac573e3e23e69 /lib/AST/ASTDiagnostic.cpp | |
parent | 6ebf09130479bc7605aa09a3e6c4dc2ba3513495 (diff) |
Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTDiagnostic.cpp')
-rw-r--r-- | lib/AST/ASTDiagnostic.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp index 6a950d8dfe..d956eeee17 100644 --- a/lib/AST/ASTDiagnostic.cpp +++ b/lib/AST/ASTDiagnostic.cpp @@ -313,7 +313,8 @@ void clang::FormatASTNodeDiagnosticArgument( Qualified = false; } const NamedDecl *ND = reinterpret_cast<const NamedDecl*>(Val); - ND->getNameForDiagnostic(S, Context.getPrintingPolicy(), Qualified); + llvm::raw_string_ostream OS(S); + ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(), Qualified); break; } case DiagnosticsEngine::ak_nestednamespec: { @@ -348,7 +349,10 @@ void clang::FormatASTNodeDiagnosticArgument( S += "function "; S += "'"; - ND->getNameForDiagnostic(S, Context.getPrintingPolicy(), true); + { + llvm::raw_string_ostream OS(S); + ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(), true); + } S += "'"; } NeedQuotes = false; |