diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp --- a/clang-tools-extra/clangd/unittests/HoverTests.cpp +++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp @@ -1567,7 +1567,7 @@ HI.Kind = index::SymbolKind::Variable; HI.NamespaceScope = ""; HI.Name = "foo"; - HI.Type = "cls<cls<cls<int> > >"; + HI.Type = "cls<cls<cls<int>>>"; HI.Value = "{}"; }}, { @@ -1579,7 +1579,7 @@ HI.Definition = "template <> struct cls<cls<cls<int>>> {}"; HI.Kind = index::SymbolKind::Struct; HI.NamespaceScope = ""; - HI.Name = "cls<cls<cls<int> > >"; + HI.Name = "cls<cls<cls<int>>>"; HI.Documentation = "type of nested templates."; }}, { diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp @@ -247,19 +247,19 @@ typedef TwoArgTemplate<TwoArgTemplate<int, Q<T{0 < 0}.b> >, S<(0 < 0), Q<b[0 < 0]> > > Nested_t; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' -// CHECK-FIXES: using Nested_t = TwoArgTemplate<TwoArgTemplate<int, Q<T{0 < 0}.b> >, S<(0 < 0), Q<b[0 < 0]> > >; +// CHECK-FIXES: using Nested_t = TwoArgTemplate<TwoArgTemplate<int, Q<T{0 < 0}.b>>, S<(0 < 0), Q<b[0 < 0]>>>; template <typename... Args> class Variadic {}; typedef Variadic<Variadic<int, bool, Q<T{0 < 0}.b> >, S<(0 < 0), Variadic<Q<b[0 < 0]> > > > Variadic_t; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' -// CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b> >, S<(0 < 0), Variadic<Q<b[0 < 0]> > > > +// CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b>>, S<(0 < 0), Variadic<Q<b[0 < 0]>>>> typedef Variadic<Variadic<int, bool, Q<T{0 < 0}.b> >, S<(0 < 0), Variadic<Q<b[0 < 0]> > > > Variadic_t, *Variadic_p; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' // CHECK-MESSAGES: :[[@LINE-2]]:103: warning: use 'using' instead of 'typedef' -// CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b> >, S<(0 < 0), Variadic<Q<b[0 < 0]> > > >; +// CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b>>, S<(0 < 0), Variadic<Q<b[0 < 0]>>>>; // CHECK-FIXES-NEXT: using Variadic_p = Variadic_t*; typedef struct { int a; } R_t, *R_p; diff --git a/clang/include/clang/AST/PrettyPrinter.h b/clang/include/clang/AST/PrettyPrinter.h --- a/clang/include/clang/AST/PrettyPrinter.h +++ b/clang/include/clang/AST/PrettyPrinter.h @@ -57,7 +57,8 @@ SuppressLifetimeQualifiers(false), SuppressTemplateArgsInCXXConstructors(false), Bool(LO.Bool), Restrict(LO.C99), Alignof(LO.CPlusPlus11), UnderscoreAlignof(LO.C11), - UseVoidForZeroParams(!LO.CPlusPlus), TerseOutput(false), + UseVoidForZeroParams(!LO.CPlusPlus), + SplitTemplateClosers(!LO.CPlusPlus11), TerseOutput(false), PolishForDeclaration(false), Half(LO.Half), MSWChar(LO.MicrosoftExt && !LO.WChar), IncludeNewlines(true), MSVCFormatting(false), ConstantsAsWritten(false), @@ -183,6 +184,9 @@ /// with zero parameters. unsigned UseVoidForZeroParams : 1; + /// Whether nested templates must be closed like a<b<c> > rather than a<b<c>>. + unsigned SplitTemplateClosers : 1; + /// Provide a 'terse' output. /// /// For example, in this mode we don't print function bodies, class members, 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 @@ -1722,7 +1722,8 @@ OS << ArgString; - NeedSpace = (!ArgString.empty() && ArgString.back() == '>'); + NeedSpace = Policy.SplitTemplateClosers && !ArgString.empty() && + ArgString.back() == '>'; FirstArg = false; } diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp @@ -63,7 +63,7 @@ // expected-error@-1 {{typename specifier refers to non-type member 'type' in 'D'}} using r1i5 = r1<invalid<D>>; // expected-error@-1 {{constraints not satisfied for class template 'r1' [with T = invalid<D>]}} -// expected-note@-2 {{while checking constraint satisfaction for template 'r1<invalid<D> >' required here}} +// expected-note@-2 {{while checking constraint satisfaction for template 'r1<invalid<D>>' required here}} // mismatching template arguments @@ -191,4 +191,4 @@ using c2 = C1_check<has_type>; // expected-error{{constraints not satisfied for class template 'C1_check' [with T = std_example::has_type]}} using c3 = C2_check<has_inner>; // expected-error{{constraints not satisfied for class template 'C2_check' [with T = std_example::has_inner]}} using c4 = C3_check<void>; // expected-error{{constraints not satisfied for class template 'C3_check' [with T = void]}} -} \ No newline at end of file +} diff --git a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp --- a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp +++ b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp @@ -13,9 +13,9 @@ eval<A<int>> eA; eval<B<int, float>> eB; -eval<C<17>> eC; // expected-error{{implicit instantiation of undefined template 'eval<C<17> >'}} -eval<D<int, 17>> eD; // expected-error{{implicit instantiation of undefined template 'eval<D<int, 17> >'}} -eval<E<int, float>> eE; // expected-error{{implicit instantiation of undefined template 'eval<E<int, float, 17> >}} +eval<C<17>> eC; // expected-error{{implicit instantiation of undefined template 'eval<C<17>>'}} +eval<D<int, 17>> eD; // expected-error{{implicit instantiation of undefined template 'eval<D<int, 17>>'}} +eval<E<int, float>> eE; // expected-error{{implicit instantiation of undefined template 'eval<E<int, float, 17>>}} template<template <int ...N> class TT> struct X0 { }; // expected-note{{previous non-type template parameter with type 'int' is here}} template<int I, int J, int ...Rest> struct X0a; diff --git a/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp b/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp --- a/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp +++ b/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp @@ -110,7 +110,7 @@ }; j_wrap<j<int>> j_wrap_j; // CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j<int, int>" -// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j_wrap<j<int, int> >" +// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j_wrap<j<int, int>>" template <typename T> struct k { diff --git a/clang/test/Misc/diag-aka-types.cpp b/clang/test/Misc/diag-aka-types.cpp --- a/clang/test/Misc/diag-aka-types.cpp +++ b/clang/test/Misc/diag-aka-types.cpp @@ -50,9 +50,9 @@ class A {}; int a1 = A<decltype(1 + 2)>(); // expected-error{{no viable conversion from 'A<decltype(1 + 2)>' (aka 'A<int>') to 'int'}} -int a2 = A<A<decltype(1 + 2)>>(); // expected-error{{no viable conversion from 'A<A<decltype(1 + 2)> >' (aka 'A<A<int> >') to 'int'}} +int a2 = A<A<decltype(1 + 2)>>(); // expected-error{{no viable conversion from 'A<A<decltype(1 + 2)>>' (aka 'A<A<int>>') to 'int'}} int a3 = A<__typeof(1 + 2)>(); // expected-error{{no viable conversion from 'A<typeof (1 + 2)>' (aka 'A<int>') to 'int'}} -int a4 = A<A<__typeof(1 + 2)>>(); // expected-error{{no viable conversion from 'A<A<typeof (1 + 2)> >' (aka 'A<A<int> >') to 'int'}} +int a4 = A<A<__typeof(1 + 2)>>(); // expected-error{{no viable conversion from 'A<A<typeof (1 + 2)>>' (aka 'A<A<int>>') to 'int'}} using B = A<decltype(1+2)>; int a5 = B(); // expected-error{{no viable conversion from 'B' (aka 'A<int>') to 'int'}} diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp --- a/clang/test/Modules/ExtDebugInfo.cpp +++ b/clang/test/Modules/ExtDebugInfo.cpp @@ -85,14 +85,14 @@ // This type is not anchored in the module by an explicit template instantiation. // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<long, DebugCXX::traits<long> >", +// CHECK-SAME: name: "Template<long, DebugCXX::traits<long>>", // CHECK-SAME: scope: ![[NS]], // CHECK-SAME: elements: // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIlNS_6traitsIlEEEE") // This type is anchored in the module by an explicit template instantiation. // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<int, DebugCXX::traits<int> >", +// CHECK-SAME: name: "Template<int, DebugCXX::traits<int>>", // CHECK-SAME: scope: ![[NS]], // CHECK-SAME: flags: DIFlagFwdDecl, // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIiNS_6traitsIiEEEE") @@ -103,7 +103,7 @@ // This one isn't. // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<float, DebugCXX::traits<float> >", +// CHECK-SAME: name: "Template<float, DebugCXX::traits<float>>", // CHECK-SAME: scope: ![[NS]], // CHECK-SAME: elements: // CHECK-SAME: templateParams: diff --git a/clang/test/Modules/ModuleDebugInfo.cpp b/clang/test/Modules/ModuleDebugInfo.cpp --- a/clang/test/Modules/ModuleDebugInfo.cpp +++ b/clang/test/Modules/ModuleDebugInfo.cpp @@ -65,7 +65,7 @@ // This type is anchored by an explicit template instantiation. // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<int, DebugCXX::traits<int> >" +// CHECK-SAME: name: "Template<int, DebugCXX::traits<int>>" // CHECK-SAME: elements: // CHECK-SAME: templateParams: // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIiNS_6traitsIiEEEE") @@ -80,7 +80,7 @@ // CHECK-SAME: identifier: "_ZTSN8DebugCXX6traitsIfEE") // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<long, DebugCXX::traits<long> >" +// CHECK-SAME: name: "Template<long, DebugCXX::traits<long>>" // CHECK-SAME: elements: // CHECK-SAME: templateParams: // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIlNS_6traitsIlEEEE") @@ -89,7 +89,7 @@ // no mangled name here yet. // CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template<float, DebugCXX::traits<float> >" +// CHECK-SAME: name: "Template<float, DebugCXX::traits<float>>" // CHECK-SAME: flags: DIFlagFwdDecl // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE") diff --git a/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_private_messages.cpp @@ -312,7 +312,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp @@ -312,7 +312,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/distribute_simd_private_messages.cpp b/clang/test/OpenMP/distribute_simd_private_messages.cpp --- a/clang/test/OpenMP/distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_private_messages.cpp @@ -312,7 +312,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/for_private_messages.cpp b/clang/test/OpenMP/for_private_messages.cpp --- a/clang/test/OpenMP/for_private_messages.cpp +++ b/clang/test/OpenMP/for_private_messages.cpp @@ -244,7 +244,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/for_simd_private_messages.cpp b/clang/test/OpenMP/for_simd_private_messages.cpp --- a/clang/test/OpenMP/for_simd_private_messages.cpp +++ b/clang/test/OpenMP/for_simd_private_messages.cpp @@ -234,7 +234,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/master_taskloop_private_messages.cpp b/clang/test/OpenMP/master_taskloop_private_messages.cpp --- a/clang/test/OpenMP/master_taskloop_private_messages.cpp +++ b/clang/test/OpenMP/master_taskloop_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/master_taskloop_simd_private_messages.cpp b/clang/test/OpenMP/master_taskloop_simd_private_messages.cpp --- a/clang/test/OpenMP/master_taskloop_simd_private_messages.cpp +++ b/clang/test/OpenMP/master_taskloop_simd_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_for_private_messages.cpp b/clang/test/OpenMP/parallel_for_private_messages.cpp --- a/clang/test/OpenMP/parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/parallel_for_private_messages.cpp @@ -234,7 +234,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/parallel_for_simd_private_messages.cpp --- a/clang/test/OpenMP/parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_private_messages.cpp @@ -234,7 +234,7 @@ m = k + 3; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_master_private_messages.cpp b/clang/test/OpenMP/parallel_master_private_messages.cpp --- a/clang/test/OpenMP/parallel_master_private_messages.cpp +++ b/clang/test/OpenMP/parallel_master_private_messages.cpp @@ -278,7 +278,7 @@ } s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp --- a/clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp +++ b/clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp --- a/clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp +++ b/clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/parallel_sections_private_messages.cpp b/clang/test/OpenMP/parallel_sections_private_messages.cpp --- a/clang/test/OpenMP/parallel_sections_private_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_private_messages.cpp @@ -278,7 +278,7 @@ } s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/sections_private_messages.cpp b/clang/test/OpenMP/sections_private_messages.cpp --- a/clang/test/OpenMP/sections_private_messages.cpp +++ b/clang/test/OpenMP/sections_private_messages.cpp @@ -278,7 +278,7 @@ } s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/simd_private_messages.cpp b/clang/test/OpenMP/simd_private_messages.cpp --- a/clang/test/OpenMP/simd_private_messages.cpp +++ b/clang/test/OpenMP/simd_private_messages.cpp @@ -191,7 +191,7 @@ for (int k = 0; k < argc; ++k) ++k; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/single_private_messages.cpp b/clang/test/OpenMP/single_private_messages.cpp --- a/clang/test/OpenMP/single_private_messages.cpp +++ b/clang/test/OpenMP/single_private_messages.cpp @@ -200,7 +200,7 @@ foo(); s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/target_firstprivate_messages.cpp b/clang/test/OpenMP/target_firstprivate_messages.cpp --- a/clang/test/OpenMP/target_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_firstprivate_messages.cpp @@ -211,7 +211,7 @@ #pragma omp target map(i) firstprivate(i) // expected-error {{firstprivate variable cannot be in a map clause in '#pragma omp target' directive}} {} s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/target_parallel_for_private_messages.cpp b/clang/test/OpenMP/target_parallel_for_private_messages.cpp --- a/clang/test/OpenMP/target_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_private_messages.cpp @@ -237,7 +237,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp --- a/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp @@ -237,7 +237,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/target_private_messages.cpp b/clang/test/OpenMP/target_private_messages.cpp --- a/clang/test/OpenMP/target_private_messages.cpp +++ b/clang/test/OpenMP/target_private_messages.cpp @@ -204,7 +204,7 @@ #pragma omp target map(i) private(i) // expected-error {{private variable cannot be in a map clause in '#pragma omp target' directive}} {} s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/target_simd_private_messages.cpp b/clang/test/OpenMP/target_simd_private_messages.cpp --- a/clang/test/OpenMP/target_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_simd_private_messages.cpp @@ -237,7 +237,7 @@ m = k + 2; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/taskloop_private_messages.cpp b/clang/test/OpenMP/taskloop_private_messages.cpp --- a/clang/test/OpenMP/taskloop_private_messages.cpp +++ b/clang/test/OpenMP/taskloop_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/OpenMP/taskloop_simd_private_messages.cpp b/clang/test/OpenMP/taskloop_simd_private_messages.cpp --- a/clang/test/OpenMP/taskloop_simd_private_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_private_messages.cpp @@ -253,7 +253,7 @@ si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} - s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} + s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float>>::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} } diff --git a/clang/test/SemaTemplate/instantiate-member-expr.cpp b/clang/test/SemaTemplate/instantiate-member-expr.cpp --- a/clang/test/SemaTemplate/instantiate-member-expr.cpp +++ b/clang/test/SemaTemplate/instantiate-member-expr.cpp @@ -16,7 +16,7 @@ template <typename CHECKER> void registerCheck(CHECKER *check) { - Checkers.push_back(S<void *>()); // expected-note {{in instantiation of member function 'vector<S<void *> >::push_back' requested here}} + Checkers.push_back(S<void *>()); // expected-note {{in instantiation of member function 'vector<S<void *>>::push_back' requested here}} } }; diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp --- a/clang/unittests/AST/DeclPrinterTest.cpp +++ b/clang/unittests/AST/DeclPrinterTest.cpp @@ -1158,8 +1158,8 @@ "template<typename T> struct X {};" "Z<X<int>> A;", "A", - "Z<X<int> > A")); - // Should be: with semicolon, without extra space in "> >" + "Z<X<int>> A")); + // Should be: with semicolon } TEST(DeclPrinter, TestTemplateArgumentList5) {