From c72c57c9e9b69944e3e009cd5e209634839581d3 Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 8 Apr 2013 18:45:10 +0000 Subject: Vendor import of clang trunk r178860: http://llvm.org/svn/llvm-project/cfe/trunk@178860 --- test/CXX/class/class.union/p1.cpp | 59 +++++++++++++++++++++--------------- test/CXX/class/class.union/p2-0x.cpp | 2 +- 2 files changed, 35 insertions(+), 26 deletions(-) (limited to 'test/CXX/class/class.union') diff --git a/test/CXX/class/class.union/p1.cpp b/test/CXX/class/class.union/p1.cpp index ee97410..439cc9c 100644 --- a/test/CXX/class/class.union/p1.cpp +++ b/test/CXX/class/class.union/p1.cpp @@ -14,25 +14,25 @@ class VirtualBase : virtual Okay { // expected-note 4 {{because type 'VirtualBas }; class Ctor { - Ctor() { abort(); } // expected-note 4 {{because type 'Ctor' has a user-declared constructor}} + Ctor() { abort(); } // expected-note 2{{because type 'Ctor' has a user-provided default constructor}} expected-note 2{{here}} }; class Ctor2 { - Ctor2(); // expected-note 3 {{because type 'Ctor2' has a user-declared constructor}} + Ctor2(); // expected-note {{because type 'Ctor2' has a user-provided default constructor}} expected-note 2{{here}} }; -class CtorTmpl { - template CtorTmpl(); // expected-note {{because type 'CtorTmpl' has a user-declared constructor}} +class CtorTmpl { // expected-note {{because type 'CtorTmpl' has no default constructor}} + template CtorTmpl(); // expected-note {{implicit default constructor suppressed by user-declared constructor}} }; -class CopyCtor { - CopyCtor(CopyCtor &cc) { abort(); } // expected-note 4 {{because type 'CopyCtor' has a user-declared copy constructor}} +class CopyCtor { // expected-note 2{{because no constructor can be used to copy an object of type 'const CopyCtor'}} + CopyCtor(CopyCtor &cc) { abort(); } }; -class CopyAssign { - CopyAssign& operator=(CopyAssign& CA) { abort(); } // expected-note 4 {{because type 'CopyAssign' has a user-declared copy assignment operator}} +class CopyAssign { // expected-note 2 {{because no assignment operator can be used to copy an object of type 'const CopyAssign'}} + CopyAssign& operator=(CopyAssign& CA) { abort(); } }; class Dtor { - ~Dtor() { abort(); } // expected-note 4 {{because type 'Dtor' has a user-declared destructor}} + ~Dtor() { abort(); } // expected-note 2 {{because type 'Dtor' has a user-provided destructor}} expected-note 2{{here}} }; union U1 { @@ -49,25 +49,25 @@ union U1 { union U2 { struct { - Virtual v; // expected-note {{because type 'U2:: struct Either { bool tag; union { // expected-note 6 {{in instantiation of member class}} diff --git a/test/CXX/class/class.union/p2-0x.cpp b/test/CXX/class/class.union/p2-0x.cpp index b5c4109..5fb8a67 100644 --- a/test/CXX/class/class.union/p2-0x.cpp +++ b/test/CXX/class/class.union/p2-0x.cpp @@ -7,7 +7,7 @@ union U1 { static const int k2 = k1; static int k3 = k2; // expected-error {{non-const static data member must be initialized out of line}} static constexpr double k4 = k2; - static const double k5 = k4; // expected-warning {{GNU extension}} expected-note {{use 'constexpr'}} + static const double k5 = k4; // expected-error {{requires 'constexpr' specifier}} expected-note {{add 'constexpr'}} int n[k1 + 3]; }; -- cgit v1.1