From: Richard Trieu Date: Thu, 24 Jul 2014 23:14:16 +0000 (+0000) Subject: Print "(default)" for default template template arguments to match the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54de80a8979ae1c2b05e7b554102445ae2401ece;p=clang Print "(default)" for default template template arguments to match the printing of other types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213902 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp index 5e6acf8e97..93b41a1335 100644 --- a/lib/AST/ASTDiagnostic.cpp +++ b/lib/AST/ASTDiagnostic.cpp @@ -1076,6 +1076,7 @@ class TemplateDiff { Tree.SetSame( FromDecl && ToDecl && FromDecl->getCanonicalDecl() == ToDecl->getCanonicalDecl()); + Tree.SetDefault(FromIter.isEnd() && FromDecl, ToIter.isEnd() && ToDecl); Tree.SetKind(DiffTree::TemplateTemplate); } diff --git a/test/Misc/diag-template-diffing.cpp b/test/Misc/diag-template-diffing.cpp index 55ffb19c33..e21dc9fb9e 100644 --- a/test/Misc/diag-template-diffing.cpp +++ b/test/Misc/diag-template-diffing.cpp @@ -1178,11 +1178,32 @@ Wrapper> W12 = // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper>' to 'Wrapper>' Wrapper> W13 = MakeWrapper>(); -// C HECK-ELIDE-NOTREE: no viable conversion from 'Wrapper>' to 'Wrapper>' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper>' to 'Wrapper>' Wrapper> W14 = MakeWrapper>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper>' to 'Wrapper>' } +namespace TemplateTemplateDefault { +template class A{}; +template class B{}; +template class C{}; +template