]> granicus.if.org Git - clang/commitdiff
Adjust and fix failing CXX tests after r332799
authorEric Fiselier <eric@efcs.ca>
Sat, 19 May 2018 03:33:56 +0000 (03:33 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 19 May 2018 03:33:56 +0000 (03:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332800 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/class/class.union/p1.cpp
test/CXX/drs/dr5xx.cpp

index 84ce1c991533d9f02d09293183b23230470af6cb..bf7f2ad24f98dce671aad6ee43cba8ecec4f4a17 100644 (file)
@@ -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 {
index 5122398b7ca3ed624d1804ebf0673cb50994f0f9..c20a873fc1c75dd3f513dce1ac5aa0c327e3387c 100644 (file)
@@ -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