diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-04 22:33:25 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-04 22:33:25 +0000 |
commit | 1f78b2bf62416f1cc6ba468e73761266e036abd2 (patch) | |
tree | f344b43ee14c77c7a4eb5b3597e0099e2a53d6ff /clang/test/SemaCXX/implicit-member-functions.cpp | |
parent | bfcb650e9647945815ef33937044fd61eca80f6b (diff) | |
download | bcm5719-llvm-1f78b2bf62416f1cc6ba468e73761266e036abd2.tar.gz bcm5719-llvm-1f78b2bf62416f1cc6ba468e73761266e036abd2.zip |
Diagnose declarations of implicit member functions.
llvm-svn: 90605
Diffstat (limited to 'clang/test/SemaCXX/implicit-member-functions.cpp')
-rw-r--r-- | clang/test/SemaCXX/implicit-member-functions.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/implicit-member-functions.cpp b/clang/test/SemaCXX/implicit-member-functions.cpp new file mode 100644 index 00000000000..186780833d3 --- /dev/null +++ b/clang/test/SemaCXX/implicit-member-functions.cpp @@ -0,0 +1,14 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +struct A { }; // expected-note {{previous implicit declaration is here}} +A::A() { } // expected-error {{definition of implicitly declared constructor}} + +struct B { }; // expected-note {{previous implicit declaration is here}} +B::B(const B&) { } // expected-error {{definition of implicitly declared copy constructor}} + +struct C { }; // expected-note {{previous implicit declaration is here}} +C& C::operator=(const C&) { return *this; } // expected-error {{definition of implicitly declared copy assignment operator}} + +struct D { }; // expected-note {{previous implicit declaration is here}} +D::~D() { } // expected-error {{definition of implicitly declared destructor}} + |