summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-09-11 06:45:03 +0000
committerJohn McCall <rjmccall@apple.com>2009-09-11 06:45:03 +0000
commite1f2ec28d8175cef27cef79966357a998fb7db64 (patch)
treee7195caf9b9a9c601c72c3c2f2f6357824dfdf14 /clang/lib/AST/DeclTemplate.cpp
parent9a7edd6bbacc0c902aed8ddf7b2a082191e25b47 (diff)
downloadbcm5719-llvm-e1f2ec28d8175cef27cef79966357a998fb7db64.tar.gz
bcm5719-llvm-e1f2ec28d8175cef27cef79966357a998fb7db64.zip
When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently. llvm-svn: 81512
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
-rw-r--r--clang/lib/AST/DeclTemplate.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp
index b46f6275d33..77c2a215071 100644
--- a/clang/lib/AST/DeclTemplate.cpp
+++ b/clang/lib/AST/DeclTemplate.cpp
@@ -422,6 +422,19 @@ void ClassTemplateSpecializationDecl::Destroy(ASTContext &C) {
CXXRecordDecl::Destroy(C);
}
+void
+ClassTemplateSpecializationDecl::getNameForDiagnostic(std::string &S,
+ const PrintingPolicy &Policy,
+ bool Qualified) const {
+ NamedDecl::getNameForDiagnostic(S, Policy, Qualified);
+
+ const TemplateArgumentList &TemplateArgs = getTemplateArgs();
+ S += TemplateSpecializationType::PrintTemplateArgumentList(
+ TemplateArgs.getFlatArgumentList(),
+ TemplateArgs.flat_size(),
+ Policy);
+}
+
ClassTemplateDecl *
ClassTemplateSpecializationDecl::getSpecializedTemplate() const {
if (SpecializedPartialSpecialization *PartialSpec
OpenPOWER on IntegriCloud