Re-do R131114 without breaking code.
I've edited one diagnostic which would print "copy constructor" for copy
constructors and "constructor" for any other constructor. If anyone is
extremely enamored with this, it can be reinstated with a simple boolean
flag rather than calling getSpecialMember, which is inappropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131143 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/class.access/p4.cpp b/test/CXX/class.access/p4.cpp
index 4228a44..3157b87 100644
--- a/test/CXX/class.access/p4.cpp
+++ b/test/CXX/class.access/p4.cpp
@@ -206,7 +206,7 @@
class Test1 { A a; }; // expected-error {{private member}}
void test1() {
- Test1 a;
+ Test1 a;
a = Test1(); // expected-note{{implicit default copy}}
}
@@ -224,12 +224,12 @@
private: A(const A &); // expected-note 2 {{declared private here}}
};
- class Test1 { A a; }; // expected-error {{field of type 'test6::A' has private copy constructor}}
+ class Test1 { A a; }; // expected-error {{field of type 'test6::A' has private constructor}}
void test1(const Test1 &t) {
Test1 a = t; // expected-note{{implicit default copy}}
}
- class Test2 : A {}; // expected-error {{base class 'test6::A' has private copy constructor}}
+ class Test2 : A {}; // expected-error {{base class 'test6::A' has private constructor}}
void test2(const Test2 &t) {
Test2 a = t; // expected-note{{implicit default copy}}
}
diff --git a/test/SemaCXX/implicit-member-functions.cpp b/test/SemaCXX/implicit-member-functions.cpp
index 5333094..8451739 100644
--- a/test/SemaCXX/implicit-member-functions.cpp
+++ b/test/SemaCXX/implicit-member-functions.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A { };
-A::A() { } // expected-error {{definition of implicitly declared constructor}}
+A::A() { } // expected-error {{definition of implicitly declared default constructor}}
struct B { };
B::B(const B&) { } // expected-error {{definition of implicitly declared copy constructor}}