r183885 - Fix some confusing diagnostic wording. s/implicit default/implicit/ if we're
Richard Smith
richard-llvm at metafoo.co.uk
Wed Jun 12 20:34:55 PDT 2013
Author: rsmith
Date: Wed Jun 12 22:34:55 2013
New Revision: 183885
URL: http://llvm.org/viewvc/llvm-project?rev=183885&view=rev
Log:
Fix some confusing diagnostic wording. s/implicit default/implicit/ if we're
not actually talking about a default constructor.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/CXX/class.access/p4.cpp
cfe/trunk/test/CXX/drs/dr0xx.cpp
cfe/trunk/test/SemaCXX/PR9572.cpp
cfe/trunk/test/SemaCXX/default-assignment-operator.cpp
cfe/trunk/test/SemaCXX/deprecated.cpp
cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp
cfe/trunk/test/SemaCXX/new-delete.cpp
cfe/trunk/test/SemaCXX/virtual-base-used.cpp
cfe/trunk/test/SemaCXX/virtual-member-functions-key-function.cpp
cfe/trunk/test/SemaObjCXX/ivar-construct.mm
cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 12 22:34:55 2013
@@ -1138,7 +1138,7 @@ def note_bitfield_decl : Note<"bit-field
def note_previous_decl : Note<"%0 declared here">;
def note_implicit_param_decl : Note<"%0 is an implicit parameter">;
def note_member_synthesized_at : Note<
- "implicit default %select{constructor|copy constructor|move constructor|copy "
+ "implicit %select{default constructor|copy constructor|move constructor|copy "
"assignment operator|move assignment operator|destructor}0 for %1 first "
"required here">;
def note_inhctor_synthesized_at : Note<
@@ -2407,8 +2407,8 @@ def err_param_default_argument_member_te
"of a %select{class template|class template partial specialization|nested "
"class in a template}0">;
def err_uninitialized_member_for_assign : Error<
- "cannot define the implicit default assignment operator for %0, because "
- "non-static %select{reference|const}1 member %2 can't use default "
+ "cannot define the implicit copy assignment operator for %0, because "
+ "non-static %select{reference|const}1 member %2 can't use copy "
"assignment operator">;
def err_uninitialized_member_in_ctor : Error<
"%select{|implicit default |inheriting }0constructor for %1 must explicitly "
Modified: cfe/trunk/test/CXX/class.access/p4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/p4.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/p4.cpp (original)
+++ cfe/trunk/test/CXX/class.access/p4.cpp Wed Jun 12 22:34:55 2013
@@ -151,7 +151,7 @@ namespace test3 {
virtual Base3
{};
Derived3 d3; // expected-note {{implicit default constructor}}\
- // expected-note{{implicit default destructor}}}
+ // expected-note{{implicit destructor}}}
}
// Conversion functions.
@@ -207,13 +207,13 @@ namespace test5 {
class Test1 { A a; }; // expected-error {{private member}}
void test1() {
Test1 a;
- a = Test1(); // expected-note{{implicit default copy}}
+ a = Test1(); // expected-note{{implicit copy}}
}
class Test2 : A {}; // expected-error {{private member}}
void test2() {
Test2 a;
- a = Test2(); // expected-note{{implicit default copy}}
+ a = Test2(); // expected-note{{implicit copy}}
}
}
@@ -226,12 +226,12 @@ namespace test6 {
class Test1 { A a; }; // expected-error {{field of type 'test6::A' has private copy constructor}}
void test1(const Test1 &t) {
- Test1 a = t; // expected-note{{implicit default copy}}
+ Test1 a = t; // expected-note{{implicit copy}}
}
class Test2 : A {}; // expected-error {{base class 'test6::A' has private copy constructor}}
void test2(const Test2 &t) {
- Test2 a = t; // expected-note{{implicit default copy}}
+ Test2 a = t; // expected-note{{implicit copy}}
}
}
Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr0xx.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr0xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr0xx.cpp Wed Jun 12 22:34:55 2013
@@ -64,7 +64,7 @@ namespace dr7 { // dr7: yes
class B : virtual private A {}; // expected-note 2 {{declared private here}}
class C : public B {} c; // expected-error 2 {{inherited virtual base class 'dr7::A' has private destructor}} \
// expected-note {{implicit default constructor for 'dr7::C' first required here}} \
- // expected-note {{implicit default destructor for 'dr7::C' first required here}}
+ // expected-note {{implicit destructor for 'dr7::C' first required here}}
class VeryDerivedC : public B, virtual public A {} vdc;
class X { ~X(); }; // expected-note {{here}}
Modified: cfe/trunk/test/SemaCXX/PR9572.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/PR9572.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/PR9572.cpp (original)
+++ cfe/trunk/test/SemaCXX/PR9572.cpp Wed Jun 12 22:34:55 2013
@@ -7,7 +7,7 @@ struct Foo : public Base { // expected-e
Foo();
};
struct Bar : public Foo {
- Bar() { } // expected-note {{implicit default destructor for 'Foo' first required here}}
+ Bar() { } // expected-note {{implicit destructor for 'Foo' first required here}}
};
struct Baz {
Foo f;
Modified: cfe/trunk/test/SemaCXX/default-assignment-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/default-assignment-operator.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/default-assignment-operator.cpp (original)
+++ cfe/trunk/test/SemaCXX/default-assignment-operator.cpp Wed Jun 12 22:34:55 2013
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-class Base { // expected-error {{cannot define the implicit default assignment operator for 'Base', because non-static reference member 'ref' can't use default assignment operator}} \
+class Base { // expected-error {{cannot define the implicit copy assignment operator for 'Base', because non-static reference member 'ref' can't use copy assignment operator}} \
// expected-warning{{class 'Base' does not declare any constructor to initialize its non-modifiable members}}
int &ref; // expected-note {{declared here}} \
// expected-note{{reference member 'ref' will never be initialized}}
};
-class X : Base { // // expected-error {{cannot define the implicit default assignment operator for 'X', because non-static const member 'cint' can't use default assignment operator}} \
+class X : Base { // // expected-error {{cannot define the implicit copy assignment operator for 'X', because non-static const member 'cint' can't use copy assignment operator}} \
// expected-note{{assignment operator for 'Base' first required here}}
public:
X();
@@ -73,7 +73,7 @@ void i() {
// Test5
-class E1 { // expected-error{{cannot define the implicit default assignment operator for 'E1', because non-static const member 'a' can't use default assignment operator}}
+class E1 { // expected-error{{cannot define the implicit copy assignment operator for 'E1', because non-static const member 'a' can't use copy assignment operator}}
public:
const int a; // expected-note{{declared here}}
@@ -101,7 +101,7 @@ namespace ProtectedCheck {
X x;
};
- void f(Z z) { z = z; } // expected-note{{implicit default copy assignment operator}}
+ void f(Z z) { z = z; } // expected-note{{implicit copy assignment operator}}
}
Modified: cfe/trunk/test/SemaCXX/deprecated.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/deprecated.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/deprecated.cpp (original)
+++ cfe/trunk/test/SemaCXX/deprecated.cpp Wed Jun 12 22:34:55 2013
@@ -39,21 +39,21 @@ namespace DeprecatedCopy {
struct Assign {
Assign &operator=(const Assign&); // expected-warning {{definition of implicit copy constructor for 'Assign' is deprecated because it has a user-declared copy assignment operator}}
};
- Assign a1, a2(a1); // expected-note {{implicit default copy constructor for 'Assign' first required here}}
+ Assign a1, a2(a1); // expected-note {{implicit copy constructor for 'Assign' first required here}}
struct Ctor {
Ctor();
Ctor(const Ctor&); // expected-warning {{definition of implicit copy assignment operator for 'Ctor' is deprecated because it has a user-declared copy constructor}}
};
Ctor b1, b2;
- void f() { b1 = b2; } // expected-note {{implicit default copy assignment operator for 'Ctor' first required here}}
+ void f() { b1 = b2; } // expected-note {{implicit copy assignment operator for 'Ctor' first required here}}
struct Dtor {
~Dtor();
// expected-warning at -1 {{definition of implicit copy constructor for 'Dtor' is deprecated because it has a user-declared destructor}}
// expected-warning at -2 {{definition of implicit copy assignment operator for 'Dtor' is deprecated because it has a user-declared destructor}}
};
- Dtor c1, c2(c1); // expected-note {{implicit default copy constructor for 'Dtor' first required here}}
- void g() { c1 = c2; } // expected-note {{implicit default copy assignment operator for 'Dtor' first required here}}
+ Dtor c1, c2(c1); // expected-note {{implicit copy constructor for 'Dtor' first required here}}
+ void g() { c1 = c2; } // expected-note {{implicit copy assignment operator for 'Dtor' first required here}}
}
#endif
Modified: cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp (original)
+++ cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp Wed Jun 12 22:34:55 2013
@@ -9,7 +9,7 @@ struct B : A { // expected-error {{no su
void operator delete (void *, int); // expected-note {{'operator delete' declared here}}
};
-void B::f() { // expected-note {{implicit default destructor for 'B' first required here}}
+void B::f() { // expected-note {{implicit destructor for 'B' first required here}}
}
struct C : A { // expected-error {{no suitable member 'operator delete' in 'C'}}
@@ -17,13 +17,13 @@ struct C : A { // expected-error {{no su
void operator delete(void *, int); // expected-note {{'operator delete' declared here}}
};
-C::C() { } // expected-note {{implicit default destructor for 'C' first required here}}
+C::C() { } // expected-note {{implicit destructor for 'C' first required here}}
struct D : A { // expected-error {{no suitable member 'operator delete' in 'D'}}
void operator delete(void *, int); // expected-note {{'operator delete' declared here}}
};
void f() {
- new D; // expected-note {{implicit default destructor for 'D' first required here}}
+ new D; // expected-note {{implicit destructor for 'D' first required here}}
}
Modified: cfe/trunk/test/SemaCXX/new-delete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/new-delete.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/new-delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/new-delete.cpp Wed Jun 12 22:34:55 2013
@@ -209,7 +209,7 @@ struct X11 : X10 { // expected-error {{n
};
void f() {
- X11 x11; // expected-note {{implicit default destructor for 'X11' first required here}}
+ X11 x11; // expected-note {{implicit destructor for 'X11' first required here}}
}
struct X12 {
@@ -394,7 +394,7 @@ namespace ArrayNewNeedsDtor {
struct A { A(); private: ~A(); }; // expected-note {{declared private here}}
struct B { B(); A a; }; // expected-error {{field of type 'ArrayNewNeedsDtor::A' has private destructor}}
B *test9() {
- return new B[5]; // expected-note {{implicit default destructor for 'ArrayNewNeedsDtor::B' first required here}}
+ return new B[5]; // expected-note {{implicit destructor for 'ArrayNewNeedsDtor::B' first required here}}
}
}
Modified: cfe/trunk/test/SemaCXX/virtual-base-used.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/virtual-base-used.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/virtual-base-used.cpp (original)
+++ cfe/trunk/test/SemaCXX/virtual-base-used.cpp Wed Jun 12 22:34:55 2013
@@ -13,19 +13,19 @@ struct D : public virtual B {
virtual void foo();
~D();
};
-void D::foo() { // expected-note {{implicit default destructor for 'B' first required here}}
+void D::foo() { // expected-note {{implicit destructor for 'B' first required here}}
}
struct E : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
-struct F : public E { // expected-note {{implicit default destructor for 'E' first required here}}
+struct F : public E { // expected-note {{implicit destructor for 'E' first required here}}
};
struct G : public virtual F {
virtual void foo();
~G();
};
-void G::foo() { // expected-note {{implicit default destructor for 'F' first required here}}
+void G::foo() { // expected-note {{implicit destructor for 'F' first required here}}
}
struct H : public virtual A {
@@ -38,5 +38,5 @@ struct J : public I {
virtual void foo();
~J();
};
-void J::foo() { // expected-note {{implicit default destructor for 'H' first required here}}
+void J::foo() { // expected-note {{implicit destructor for 'H' first required here}}
}
Modified: cfe/trunk/test/SemaCXX/virtual-member-functions-key-function.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/virtual-member-functions-key-function.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/virtual-member-functions-key-function.cpp (original)
+++ cfe/trunk/test/SemaCXX/virtual-member-functions-key-function.cpp Wed Jun 12 22:34:55 2013
@@ -4,7 +4,7 @@ struct A {
};
struct B : A { // expected-error {{no suitable member 'operator delete' in 'B'}}
- B() { } // expected-note {{implicit default destructor for 'B' first required here}}
+ B() { } // expected-note {{implicit destructor for 'B' first required here}}
void operator delete(void *, int); // expected-note {{'operator delete' declared here}}
};
@@ -14,7 +14,7 @@ struct C : A { // expected-error {{no s
void f() {
(void)new B;
- (void)new C; // expected-note {{implicit default destructor for 'C' first required here}}
+ (void)new C; // expected-note {{implicit destructor for 'C' first required here}}
}
// Make sure that the key-function computation is consistent when the
Modified: cfe/trunk/test/SemaObjCXX/ivar-construct.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/ivar-construct.mm?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/ivar-construct.mm (original)
+++ cfe/trunk/test/SemaObjCXX/ivar-construct.mm Wed Jun 12 22:34:55 2013
@@ -12,7 +12,7 @@ struct X : T { }; // expected-error 2{{p
struct Z; // expected-note{{forward declaration}}
@interface A {
- X<Y> x; // expected-note{{implicit default destructor}}
+ X<Y> x; // expected-note{{implicit destructor}}
Y y; // expected-error{{private destructor}}
}
@end
Modified: cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp?rev=183885&r1=183884&r2=183885&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp (original)
+++ cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp Wed Jun 12 22:34:55 2013
@@ -72,7 +72,7 @@ namespace PR7114 {
int f() { return B<int>::value; }
void test_typeid(B<float>::Inner bfi) {
- (void)typeid(bfi); // expected-note{{implicit default destructor}}
+ (void)typeid(bfi); // expected-note{{implicit destructor}}
}
template<typename T>
More information about the cfe-commits
mailing list