From: Eric Fiselier Date: Sat, 19 May 2018 03:33:56 +0000 (+0000) Subject: Adjust and fix failing CXX tests after r332799 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdd8eec77435aa6a2ea91fa4844fedf6d8a34cc3;p=clang Adjust and fix failing CXX tests after r332799 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332800 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/class/class.union/p1.cpp b/test/CXX/class/class.union/p1.cpp index 84ce1c9915..bf7f2ad24f 100644 --- a/test/CXX/class/class.union/p1.cpp +++ b/test/CXX/class/class.union/p1.cpp @@ -38,9 +38,9 @@ class Dtor { union U1 { Virtual v; // expected-error {{union member 'v' has a non-trivial copy constructor}} VirtualBase vbase; // expected-error {{union member 'vbase' has a non-trivial copy constructor}} - Ctor ctor; // expected-error {{union member 'ctor' has a non-trivial constructor}} - Ctor2 ctor2; // expected-error {{union member 'ctor2' has a non-trivial constructor}} - CtorTmpl ctortmpl; // expected-error {{union member 'ctortmpl' has a non-trivial constructor}} + Ctor ctor; // expected-error {{union member 'ctor' has a non-trivial default constructor}} + Ctor2 ctor2; // expected-error {{union member 'ctor2' has a non-trivial default constructor}} + CtorTmpl ctortmpl; // expected-error {{union member 'ctortmpl' has a non-trivial default constructor}} CopyCtor copyctor; // expected-error {{union member 'copyctor' has a non-trivial copy constructor}} CopyAssign copyassign; // expected-error {{union member 'copyassign' has a non-trivial copy assignment operator}} Dtor dtor; // expected-error {{union member 'dtor' has a non-trivial destructor}} @@ -56,10 +56,10 @@ union U2 { } m2; // expected-error {{union member 'm2' has a non-trivial copy constructor}} struct { Ctor ctor; // expected-note {{because field of type 'Ctor' has a user-provided default constructor}} - } m3; // expected-error {{union member 'm3' has a non-trivial constructor}} + } m3; // expected-error {{union member 'm3' has a non-trivial default constructor}} struct { Ctor2 ctor2; // expected-note {{because field of type 'Ctor2' has a user-provided default constructor}} - } m3a; // expected-error {{union member 'm3a' has a non-trivial constructor}} + } m3a; // expected-error {{union member 'm3a' has a non-trivial default constructor}} struct { // expected-note {{no constructor can be used to copy an object of type 'const}} CopyCtor copyctor; } m4; // expected-error {{union member 'm4' has a non-trivial copy constructor}} @@ -80,9 +80,9 @@ union U3 { struct s2 : VirtualBase { // expected-note {{because the function selected to copy base class of type 'VirtualBase' is not trivial}} } m2; // expected-error {{union member 'm2' has a non-trivial copy constructor}} struct s3 : Ctor { // expected-note {{because base class of type 'Ctor' has a user-provided default constructor}} - } m3; // expected-error {{union member 'm3' has a non-trivial constructor}} + } m3; // expected-error {{union member 'm3' has a non-trivial default constructor}} struct s3a : Ctor2 { // expected-note {{because base class of type 'Ctor2' has a user-provided default constructor}} - } m3a; // expected-error {{union member 'm3a' has a non-trivial constructor}} + } m3a; // expected-error {{union member 'm3a' has a non-trivial default constructor}} struct s4 : CopyCtor { // expected-note {{because no constructor can be used to copy an object of type 'const U3::s4'}} } m4; // expected-error {{union member 'm4' has a non-trivial copy constructor}} struct s5 : CopyAssign { // expected-note {{because no assignment operator can be used to copy an object of type 'const U3::s5'}} @@ -93,7 +93,7 @@ union U3 { } m7; struct s8 { s8(...) = delete; // expected-note {{because it is a variadic function}} expected-warning {{C++11}} - } m8; // expected-error {{union member 'm8' has a non-trivial constructor}} + } m8; // expected-error {{union member 'm8' has a non-trivial default constructor}} }; union U4 { diff --git a/test/CXX/drs/dr5xx.cpp b/test/CXX/drs/dr5xx.cpp index 5122398b7c..c20a873fc1 100644 --- a/test/CXX/drs/dr5xx.cpp +++ b/test/CXX/drs/dr5xx.cpp @@ -74,7 +74,7 @@ namespace dr512 { // dr512: yes }; union U { A a; }; #if __cplusplus < 201103L - // expected-error@-2 {{has a non-trivial constructor}} + // expected-error@-2 {{has a non-trivial default constructor}} // expected-note@-6 {{no default constructor}} // expected-note@-6 {{suppressed by user-declared constructor}} #endif