File tree Expand file tree Collapse file tree 8 files changed +18
-18
lines changed
test/CXX/class/class.compare Expand file tree Collapse file tree 8 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -8979,8 +8979,8 @@ def note_defaulted_comparison_calls_deleted : Note<
8979
8979
"defaulted %0 is implicitly deleted because it would invoke a deleted "
8980
8980
"comparison function%select{| for member %2| for base class %2}1">;
8981
8981
def note_defaulted_comparison_no_viable_function : Note<
8982
- "defaulted %0 is implicitly deleted because there is no viable comparison "
8983
- "function%select{| for member %2| for base class %2}1 ">;
8982
+ "defaulted %0 is implicitly deleted because there is no viable three-way "
8983
+ "comparison function for %select{| member| base class}1 %2">;
8984
8984
def note_defaulted_comparison_no_viable_function_synthesized : Note<
8985
8985
"three-way comparison cannot be synthesized because there is no viable "
8986
8986
"function for %select{'=='|'<'}0 comparison">;
Original file line number Diff line number Diff line change @@ -7632,7 +7632,7 @@ class DefaultedComparisonAnalyzer
7632
7632
7633
7633
private:
7634
7634
Subobject getCompleteObject() {
7635
- return Subobject{Subobject::CompleteObject, nullptr , FD->getLocation()};
7635
+ return Subobject{Subobject::CompleteObject, RD , FD->getLocation()};
7636
7636
}
7637
7637
7638
7638
Subobject getBase(CXXBaseSpecifier *Base) {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ namespace P1946 {
127
127
friend bool operator ==(A &, A &); // expected-note {{would lose const qualifier}}
128
128
};
129
129
struct B {
130
- A a; // expected-note {{no viable comparison}}
130
+ A a; // expected-note {{no viable three-way comparison}}
131
131
friend bool operator ==(B, B) = default ; // ok
132
132
friend bool operator ==(const B&, const B&) = default ; // expected-warning {{deleted}}
133
133
};
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ struct A3 {
44
44
45
45
bool operator ==(const A3 &) const = default ; // expected-warning {{implicitly deleted}}
46
46
bool operator <(const A3 &) const = default ; // expected-warning {{implicitly deleted}}
47
- // expected-note@-1 {{because there is no viable comparison function}}
47
+ // expected-note@-1 {{because there is no viable three-way comparison function for 'A3' }}
48
48
};
49
49
50
50
struct B1 {
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ namespace DeleteAfterFirstDecl {
99
99
struct Q {
100
100
struct X {
101
101
friend std::strong_ordering operator <=>(const X&, const X&);
102
- } x; // expected-note {{no viable comparison}}
102
+ } x; // expected-note {{no viable three-way comparison}}
103
103
// expected-error@+1 {{defaulting the corresponding implicit 'operator==' for this defaulted 'operator<=>' would delete it after its first declaration}}
104
104
friend std::strong_ordering operator <=>(const Q&, const Q&) = default ;
105
105
};
Original file line number Diff line number Diff line change @@ -18,26 +18,26 @@ struct G { bool operator==(G) const = delete; }; // expected-note {{deleted here
18
18
struct H1 {
19
19
bool operator ==(const H1 &) const = default ;
20
20
bool operator <(const H1 &) const = default ; // expected-warning {{implicitly deleted}}
21
- // expected-note@-1 {{because there is no viable comparison function}}
21
+ // expected-note@-1 {{because there is no viable three-way comparison function for 'H1' }}
22
22
void (*x)();
23
23
};
24
24
struct H2 {
25
25
bool operator ==(const H2 &) const = default ;
26
26
bool operator <(const H2 &) const = default ; // expected-warning {{implicitly deleted}}
27
- // expected-note@-1 {{because there is no viable comparison function}}
27
+ // expected-note@-1 {{because there is no viable three-way comparison function for 'H2' }}
28
28
void (H2::*x)();
29
29
};
30
30
struct H3 {
31
31
bool operator ==(const H3 &) const = default ;
32
32
bool operator <(const H3 &) const = default ; // expected-warning {{implicitly deleted}}
33
- // expected-note@-1 {{because there is no viable comparison function}}
33
+ // expected-note@-1 {{because there is no viable three-way comparison function for 'H3' }}
34
34
int H3::*x;
35
35
};
36
36
37
37
template <typename T> struct X {
38
38
X ();
39
39
bool operator ==(const X&) const = default ; // #x expected-note 4{{deleted here}}
40
- T t; // expected-note 3{{because there is no viable comparison function for member 't'}}
40
+ T t; // expected-note 3{{because there is no viable three-way comparison function for member 't'}}
41
41
// expected-note@-1 {{because it would invoke a deleted comparison function for member 't'}}
42
42
};
43
43
Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ namespace Deletedness {
78
78
};
79
79
80
80
// expected-note@#base {{deleted comparison function for base class 'C'}}
81
- // expected-note@#base {{no viable comparison function for base class 'D1'}}
81
+ // expected-note@#base {{no viable three-way comparison function for base class 'D1'}}
82
82
// expected-note@#base {{three-way comparison cannot be synthesized because there is no viable function for '<' comparison}}
83
- // expected-note@#base {{no viable comparison function for base class 'D2'}}
83
+ // expected-note@#base {{no viable three-way comparison function for base class 'D2'}}
84
84
// expected-note@#base {{three-way comparison cannot be synthesized because there is no viable function for '==' comparison}}
85
85
// expected-note@#base {{deleted comparison function for base class 'E'}}
86
86
// expected-note@#base {{implied comparison for base class 'F' is ambiguous}}
@@ -110,9 +110,9 @@ namespace Deletedness {
110
110
}
111
111
112
112
// expected-note@#arr {{deleted comparison function for member 'arr'}}
113
- // expected-note@#arr {{no viable comparison function for member 'arr'}}
113
+ // expected-note@#arr {{no viable three-way comparison function for member 'arr'}}
114
114
// expected-note@#arr {{three-way comparison cannot be synthesized because there is no viable function for '<' comparison}}
115
- // expected-note@#arr {{no viable comparison function for member 'arr'}}
115
+ // expected-note@#arr {{no viable three-way comparison function for member 'arr'}}
116
116
// expected-note@#arr {{three-way comparison cannot be synthesized because there is no viable function for '==' comparison}}
117
117
// expected-note@#arr {{deleted comparison function for member 'arr'}}
118
118
// expected-note@#arr {{implied comparison for member 'arr' is ambiguous}}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ namespace DeducedVsSynthesized {
52
52
bool operator <(const A&) const ;
53
53
};
54
54
struct B {
55
- A a; // expected-note {{no viable comparison function for member 'a'}}
55
+ A a; // expected-note {{no viable three-way comparison function for member 'a'}}
56
56
auto operator <=>(const B&) const = default ; // expected-warning {{implicitly deleted}}
57
57
};
58
58
}
@@ -159,16 +159,16 @@ namespace BadDeducedType {
159
159
namespace PR48856 {
160
160
struct A {
161
161
auto operator <=>(const A &) const = default ; // expected-warning {{implicitly deleted}}
162
- void (*x)(); // expected-note {{because there is no viable comparison function for member 'x'}}
162
+ void (*x)(); // expected-note {{because there is no viable three-way comparison function for member 'x'}}
163
163
};
164
164
165
165
struct B {
166
166
auto operator <=>(const B &) const = default ; // expected-warning {{implicitly deleted}}
167
- void (B::*x)(); // expected-note {{because there is no viable comparison function for member 'x'}}
167
+ void (B::*x)(); // expected-note {{because there is no viable three-way comparison function for member 'x'}}
168
168
};
169
169
170
170
struct C {
171
171
auto operator <=>(const C &) const = default ; // expected-warning {{implicitly deleted}}
172
- int C::*x; // expected-note {{because there is no viable comparison function for member 'x'}}
172
+ int C::*x; // expected-note {{because there is no viable three-way comparison function for member 'x'}}
173
173
};
174
174
}
You can’t perform that action at this time.
0 commit comments