Skip to content

Commit fcda3b2

Browse files
committed
Fix expected directives
1 parent bca2bfe commit fcda3b2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

clang/test/CXX/drs/cwg2xx.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ template <class T> class Templ { // #cwg203-ex3-Templ
9797
};
9898

9999
void foo() { Templ<Derived> x(&Derived::func); }
100-
// expected-error@-1 {{<source>:46:29: error: no matching constructor for initialization of 'Templ<Derived>'}}
100+
// expected-error@-1 {{no matching constructor for initialization of 'Templ<Derived>'}}
101101
// expected-note@#cwg203-ex3-Templ {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int (cwg203::ex3::Base::*)() const' to 'const Templ<Derived>' for 1st argument}}
102-
// expected-note@#cwg203-ex3-Templ {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int (cwg203::ex3::Base::*)() const' to 'Templ<Derived>' for 1st argument}}
102+
// since-cxx11-note@#cwg203-ex3-Templ {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int (cwg203::ex3::Base::*)() const' to 'Templ<Derived>' for 1st argument}}
103103
// expected-note@#cwg203-ex3-Templ-ctor {{candidate template ignored: could not match 'cwg203::ex3::Derived' against 'cwg203::ex3::Base'}}
104104
} // namespace ex3
105105

@@ -114,12 +114,13 @@ struct Derived : Base1, Base2 {
114114

115115
int f() {
116116
Derived d;
117+
// FIXME: in the diagnostic below, Very_base is fully qualified, but Derived is not
117118
int Derived::*a_ptr = &Derived::Base1::a;
118119
/* expected-error@-1
119-
{{ambiguous conversion from pointer to member of base class 'cwg203::ex4::Very_base' to pointer to member of derived class 'cwg203::ex4::Derived':
120+
{{ambiguous conversion from pointer to member of base class 'cwg203::ex4::Very_base' to pointer to member of derived class 'Derived':
120121
struct cwg203::ex4::Derived -> Base1 -> Very_base
121122
struct cwg203::ex4::Derived -> Base2 -> Very_base}}*/
122-
};
123+
}
123124
} // namespace ex4
124125

125126
namespace ex5 {
@@ -168,8 +169,9 @@ struct Derived : private Base { // #cwg203-ex6-Derived
168169
int main() {
169170
Derived d;
170171
int b = d.a;
172+
// FIXME: in the diagnostic below, Base is fully qualified, but Derived is not
171173
int Derived::*ptr = &Derived::a;
172-
// expected-error@-1 {{cannot cast private base class 'cwg203::ex6::Base' to 'cwg203::ex6::Derived'}}
174+
// expected-error@-1 {{cannot cast private base class 'cwg203::ex6::Base' to 'Derived'}}
173175
// expected-note@#cwg203-ex6-Derived {{declared private here}}
174176
}
175177
} // namespace ex6

0 commit comments

Comments
 (0)