diff options
Diffstat (limited to 'include/clang/AST')
-rw-r--r-- | include/clang/AST/Decl.h | 8 | ||||
-rw-r--r-- | include/clang/AST/DeclTemplate.h | 2 | ||||
-rw-r--r-- | include/clang/AST/Type.h | 18 |
3 files changed, 5 insertions, 23 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index c10080366c..010563fdd9 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -169,13 +169,13 @@ public: /// specializations are printed with their template arguments. /// /// TODO: use an API that doesn't require so many temporary strings - virtual void getNameForDiagnostic(std::string &S, + virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const { if (Qualified) - S += getQualifiedNameAsString(Policy); + OS << getQualifiedNameAsString(Policy); else - S += getNameAsString(); + printName(OS); } /// declarationReplaces - Determine whether this declaration, if @@ -1606,7 +1606,7 @@ public: return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); } - virtual void getNameForDiagnostic(std::string &S, + virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const; diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 4b109ac8f8..525a156a93 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -1432,7 +1432,7 @@ public: static ClassTemplateSpecializationDecl * CreateDeserialized(ASTContext &C, unsigned ID); - virtual void getNameForDiagnostic(std::string &S, + virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const; diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index c6f8baa202..df285101e3 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -3012,9 +3012,6 @@ public: bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } - // FIXME: Remove the string version. - void printExceptionSpecification(std::string &S, - const PrintingPolicy &Policy) const; void printExceptionSpecification(raw_ostream &OS, const PrintingPolicy &Policy) const; @@ -3656,21 +3653,6 @@ public: /// \brief Print a template argument list, including the '<' and '>' /// enclosing the template arguments. - // FIXME: remove the string ones. - static std::string PrintTemplateArgumentList(const TemplateArgument *Args, - unsigned NumArgs, - const PrintingPolicy &Policy, - bool SkipBrackets = false); - - static std::string PrintTemplateArgumentList(const TemplateArgumentLoc *Args, - unsigned NumArgs, - const PrintingPolicy &Policy); - - static std::string PrintTemplateArgumentList(const TemplateArgumentListInfo &, - const PrintingPolicy &Policy); - - /// \brief Print a template argument list, including the '<' and '>' - /// enclosing the template arguments. static void PrintTemplateArgumentList(raw_ostream &OS, const TemplateArgument *Args, unsigned NumArgs, |