diff options
author | John McCall <rjmccall@apple.com> | 2009-09-11 06:45:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-11 06:45:03 +0000 |
commit | 136a6988960ac3aeb96f298da7a1a182db7217cd (patch) | |
tree | 09fb77402986a09d43cc27f50893bfa28496c44a /lib/AST/Decl.cpp | |
parent | a4d3282683b22608b05a3d4566c96af269d99c5c (diff) |
When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 776a26595b..16936428f3 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -404,6 +404,18 @@ void FunctionDecl::Destroy(ASTContext& C) { Decl::Destroy(C); } +void FunctionDecl::getNameForDiagnostic(std::string &S, + const PrintingPolicy &Policy, + bool Qualified) const { + NamedDecl::getNameForDiagnostic(S, Policy, Qualified); + const TemplateArgumentList *TemplateArgs = getTemplateSpecializationArgs(); + if (TemplateArgs) + S += TemplateSpecializationType::PrintTemplateArgumentList( + TemplateArgs->getFlatArgumentList(), + TemplateArgs->flat_size(), + Policy); + +} Stmt *FunctionDecl::getBody(const FunctionDecl *&Definition) const { for (redecl_iterator I = redecls_begin(), E = redecls_end(); I != E; ++I) { |