Skip to content

Commit

Permalink
[AST] Print a<b<c>> without extra spaces in C++11 or later.
Browse files Browse the repository at this point in the history
Summary: It's not 1998 anymore.

Reviewers: kadircet

Subscribers: jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76801
  • Loading branch information
sam-mccall committed Mar 26, 2020
1 parent 6324912 commit 159a9f7
Show file tree
Hide file tree
Showing 35 changed files with 54 additions and 50 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/unittests/HoverTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ TEST(Hover, All) {
HI.Kind = index::SymbolKind::Variable;
HI.NamespaceScope = "";
HI.Name = "foo";
HI.Type = "cls<cls<cls<int> > >";
HI.Type = "cls<cls<cls<int>>>";
HI.Value = "{}";
}},
{
Expand All @@ -1579,7 +1579,7 @@ TEST(Hover, All) {
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.";
}},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,19 @@ typedef Q<T{0 < 0}.b> Q3_t;

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;
Expand Down
6 changes: 5 additions & 1 deletion clang/include/clang/AST/PrettyPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ struct PrintingPolicy {
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),
Expand Down Expand Up @@ -183,6 +184,9 @@ struct PrintingPolicy {
/// 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,
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/AST/TypePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,13 +1722,13 @@ static void printTo(raw_ostream &OS, ArrayRef<TA> Args,

OS << ArgString;

NeedSpace = (!ArgString.empty() && ArgString.back() == '>');
// If the last character of our string is '>', add another space to
// keep the two '>''s separate tokens.
NeedSpace = Policy.SplitTemplateClosers && !ArgString.empty() &&
ArgString.back() == '>';
FirstArg = false;
}

// If the last character of our string is '>', add another space to
// keep the two '>''s separate tokens. We don't *have* to do this in
// C++0x, but it's still good hygiene.
if (NeedSpace)
OS << ' ';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ template<typename T> struct invalid { typename T::type x; };
// 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

Expand Down Expand Up @@ -191,4 +191,4 @@ namespace std_example {
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]}}
}
}
6 changes: 3 additions & 3 deletions clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ template <class T1, class T2, int N = 17> struct E;

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct j_wrap {
};
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 {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Misc/diag-aka-types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ template <typename T>
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'}}
Expand Down
6 changes: 3 additions & 3 deletions clang/test/Modules/ExtDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ void foo() {

// 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")
Expand All @@ -103,7 +103,7 @@ void foo() {

// 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:
Expand Down
6 changes: 3 additions & 3 deletions clang/test/Modules/ModuleDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int main(int argc, char **argv) {
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}}
}

Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/distribute_simd_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/for_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/for_simd_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/master_taskloop_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
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}}
}

Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/parallel_for_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/parallel_for_simd_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/parallel_master_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ int main(int argc, char **argv) {
}

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}}
}

Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
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}}
}

Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/parallel_sections_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ int main(int argc, char **argv) {
}

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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/sections_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ int main(int argc, char **argv) {
}

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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/simd_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/single_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int main(int argc, char **argv) {
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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/target_firstprivate_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int main(int argc, char **argv) {
#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}}
}

2 changes: 1 addition & 1 deletion clang/test/OpenMP/target_parallel_for_private_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int main(int argc, char **argv) {
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}}
}

Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int main(int argc, char **argv) {
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}}
}

Loading

0 comments on commit 159a9f7

Please sign in to comment.