Skip to content

Commit 6c48041

Browse files
author
Aidan
committed
revert tests, will be changed later. One should still fail
1 parent 1468562 commit 6c48041

File tree

7 files changed

+26
-22
lines changed

7 files changed

+26
-22
lines changed

clang/test/CXX/drs/cwg2xx.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -645,23 +645,23 @@ namespace cwg241 { // cwg241: 9
645645
// cxx98-17-error@-1 {{use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension}}
646646
A::f<3>(b);
647647
// expected-error@-1 {{no matching function for call to 'f'}}
648-
// expected-note@#cwg241-A-f {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
648+
// expected-note@#cwg241-A-f {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
649649
A::g<3>(b);
650650
C::f<3>(b);
651651
// expected-error@-1 {{no matching function for call to 'f'}}
652-
// expected-note@#cwg241-C-f {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
653-
// expected-note@#cwg241-C-f {{expected a type, but got value '3'}}
652+
// expected-note@#cwg241-C-f 2{{template parameter is declared here}}
653+
// expected-note@#cwg241-C-f 2{{candidate template ignored: invalid explicitly-specified argument: expected a type, but got value '3}}
654+
654655
C::g<3>(b);
655656
// expected-error@-1 {{no matching function for call to 'g'}}
656-
// expected-note@#cwg241-C-g {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
657-
// expected-note@#cwg241-C-g {{expected a type, but got value '3'}}
657+
// expected-note@#cwg241-C-g {{template parameter is declared here}}
658+
// expected-note@#cwg241-C-g {{candidate template ignored: invalid explicitly-specified argument: expected a type, but got value '3}}
659+
658660
using C::f;
659661
using C::g;
660662
f<3>(b);
661663
// expected-error@-1 {{no matching function for call to 'f'}}
662-
// expected-note@#cwg241-C-f {{andidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
663-
// expected-note@#cwg241-C-f {{expected a type, but got value '3'}}
664-
// expected-note@#cwg241-A-f {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
664+
// expected-note@#cwg241-A-f {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
665665
g<3>(b);
666666
}
667667
} // namespace cwg241
@@ -954,7 +954,8 @@ namespace cwg258 { // cwg258: 2.8
954954
int &w = b.f(0);
955955
int &x = b.g<int>(0);
956956
// expected-error@-1 {{no matching member function for call to 'g'}}
957-
// expected-note@#cwg258-B-g {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
957+
// expected-note@#cwg258-B-g {{template parameter is declared here}}
958+
// expected-note@#cwg258-B-g {{candidate template ignored: invalid explicitly-specified argument: expected constant of type 'int' but got type 'int'}}
958959
int &y = b.h();
959960
float &z = const_cast<const B&>(b).h();
960961

clang/test/CXX/drs/cwg3xx.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,10 @@ namespace cwg354 { // cwg354: 3.1 c++11
981981
int b0 = both<0>();
982982
int b1 = both<(int*)0>();
983983
// cxx98-error@-1 {{no matching function for call to 'both'}}
984-
// cxx98-note@#cwg354-both-int-ptr {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
985-
// cxx98-note@#cwg354-both-int {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
984+
// cxx98-note@#cwg354-both-int-ptr {{template parameter is declared here}}
985+
// cxx98-note@#cwg354-both-int-ptr {{candidate template ignored: invalid explicitly-specified argument: could not convert '(int *)0' from 'int *' to 'int'}}
986+
// cxx98-note@#cwg354-both-int {{template parameter is declared here}}
987+
// cxx98-note@#cwg354-both-int {{candidate template ignored: invalid explicitly-specified argument: could not convert '(int *)0' from 'int *' to 'int'}}
986988

987989
template<int S::*> struct ptr_mem {}; // #cwg354-ptr_mem
988990
ptr_mem<0> m0; // #cwg354-m0

clang/test/CXX/expr/expr.const/p3-0x.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ void c() {
106106
}
107107
}
108108
template <bool B> int f() { return B; } // #f-bool-int
109-
// expected-note@#f-bool-int {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
110-
// expected-note@#f-bool-int {{could not convert '&S::operator int' from 'int (S::*)() const' to 'bool'}}
109+
// expected-note@#f-bool-int {{template parameter is declared here}}
110+
// expected-note@#f-bool-int {{candidate template ignored: invalid explicitly-specified argument: could not convert '&S::operator int' from 'int (S::*)() const' to 'bool'}}
111111
template int f<&S::operator int>(); // expected-error {{does not refer to a function template}}
112112
template int f<(bool)&S::operator int>();
113113

clang/test/CXX/temp/temp.res/temp.local/p1.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ template<typename> char id;
1010
template<typename> struct TempType {};
1111
template<template<typename> class> struct TempTemp {};
1212

13-
template<typename> void use(int&); // expected-note {{invalid explicitly-specified argument}} expected-note {{no known conversion}}
13+
template<typename> void use(int&); // expected-note{{template parameter is declared here}} // expected-note {{invalid explicitly-specified argument}} expected-note {{no known conversion}}
1414
template<template<typename> class> void use(float&); // expected-note 2{{no known conversion}}
15-
template<int> void use(char&); // expected-note 2{{invalid explicitly-specified argument}}
15+
template<int> void use(char&); // expected-note 2{{template parameter is declared here}} // expected-note 2{{invalid explicitly-specified argument}}
1616

1717
template<typename T> struct A {
1818
template<typename> struct C {};

clang/test/Modules/cxx-templates.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ void g() {
4242
template_param_kinds_1<int>(); // ok, from cxx-templates-b.h
4343

4444
template_param_kinds_2<Tmpl_T_C>(); // expected-error {{no matching function}}
45+
// expected-note@Inputs/cxx-templates-a.h:11 {{template parameter is declared here}}
4546
// expected-note@Inputs/cxx-templates-a.h:11 {{invalid explicitly-specified argument}}
4647
// expected-note@Inputs/cxx-templates-b.h:11 {{invalid explicitly-specified argument}}
4748

4849
template_param_kinds_2<Tmpl_T_I_I>(); // expected-error {{ambiguous}}
50+
// expected-note@Inputs/cxx-templates-b.h:11 {{template parameter is declared here}}
4951
// expected-note@Inputs/cxx-templates-a.h:11 {{candidate}}
5052
// expected-note@Inputs/cxx-templates-b.h:11 {{candidate}}
5153

clang/test/SemaTemplate/overload-candidates.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ void test_dyn_cast(int* ptr) {
1616
(void)dyn_cast(ptr); // expected-error{{no matching function for call to 'dyn_cast'}}
1717
}
1818

19-
template<int I, typename T>
19+
template<int I, typename T> // expected-note {{template parameter is declared here}}
2020
void get(const T&); // #get-int-typename
21-
// expected-note@#get-int-typename {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
22-
// expected-note@#get-int-typename {{expected constant of type 'int' but got type 'int'}}
23-
template<template<class T> class, typename T>
24-
void get(const T&); // expected-note{{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
21+
// expected-note@#get-int-typename {{candidate template ignored: invalid explicitly-specified argument: expected constant of type 'int' but got type 'int'}}
22+
template<template<class T> class, typename T> // expected-note {{template parameter is declared here}}
23+
void get(const T&); // expected-note {{candidate template ignored: invalid explicitly-specified argument for 1st template parameter}}
2524

2625
void test_get(void *ptr) {
2726
get<int>(ptr); // expected-error{{no matching function for call to 'get'}}

clang/test/SemaTemplate/temp_arg_nontype_cxx11.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ void TempFunc() {}
4343

4444
void Useage() {
4545
//expected-error@+3 {{no matching function}}
46-
//expected-note@-4 {{candidate template ignored: invalid explicitly-specified argument for 2nd template parameter}}
47-
//expected-note@-5 {{could not convert '-1' from 'int' to 'unsigned int'}}
46+
//expected-note@-5 {{template parameter is declared here}}
47+
//expected-note@-5 {{candidate template ignored: invalid explicitly-specified argument: could not convert '-1' from 'int' to 'unsigned int'}}
4848
TempFunc<1, -1, 1>();
4949
}
5050
}

0 commit comments

Comments
 (0)