diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp --- a/clang/lib/AST/TypePrinter.cpp +++ b/clang/lib/AST/TypePrinter.cpp @@ -1449,8 +1449,7 @@ T->getTemplateName().print(OS, Policy); } - const TemplateParameterList *TPL = TD ? TD->getTemplateParameters() : nullptr; - printTemplateArgumentList(OS, T->template_arguments(), Policy, TPL); + printTemplateArgumentList(OS, T->template_arguments(), Policy); spaceBeforePlaceHolder(OS); } diff --git a/clang/test/SemaTemplate/class-template-id.cpp b/clang/test/SemaTemplate/class-template-id.cpp --- a/clang/test/SemaTemplate/class-template-id.cpp +++ b/clang/test/SemaTemplate/class-template-id.cpp @@ -9,9 +9,9 @@ if (ptr) return ptr; // okay else if (ptr2) - return ptr2; // expected-error{{cannot initialize return object of type 'A *' with an lvalue of type 'const A *'}} + return ptr2; // expected-error{{cannot initialize return object of type 'A *' (aka 'A *') with an lvalue of type 'const A *'}} else { - return ptr3; // expected-error{{cannot initialize return object of type 'A *' with an lvalue of type 'A *'}} + return ptr3; // expected-error{{cannot initialize return object of type 'A *' (aka 'A *') with an lvalue of type 'A *'}} } } diff --git a/clang/test/SemaTemplate/default-arguments-ast-print.cpp b/clang/test/SemaTemplate/default-arguments-ast-print.cpp --- a/clang/test/SemaTemplate/default-arguments-ast-print.cpp +++ b/clang/test/SemaTemplate/default-arguments-ast-print.cpp @@ -10,3 +10,15 @@ // CHECK: int Foo::method1() return 10; } + +int test_typedef() { + typedef Foo TypedefArg; + // CHECK: typedef Foo TypedefArg; + return 10; +} + +int test_typedef2() { + typedef Foo TypedefArg; + // CHECK: typedef Foo TypedefArg; + return 10; +}