aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/anonymous-struct.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-12-08 02:53:02 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-12-08 02:53:02 +0000
commitac71351acdefc9de0c770c1d717e621ac9e684bf (patch)
treeb6c1a4193072a159a10d6b6bc583a1aeba65ef90 /test/SemaCXX/anonymous-struct.cpp
parent5f5250b140544436eb3c2fbd9f43e14019ef01f2 (diff)
Properly compute triviality for explicitly-defaulted or deleted special members.
Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/anonymous-struct.cpp')
-rw-r--r--test/SemaCXX/anonymous-struct.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/anonymous-struct.cpp b/test/SemaCXX/anonymous-struct.cpp
index 19a88d739a..8a61041463 100644
--- a/test/SemaCXX/anonymous-struct.cpp
+++ b/test/SemaCXX/anonymous-struct.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct S {
- S(); // expected-note {{because type 'S' has a user-declared constructor}}
+ S(); // expected-note {{because type 'S' has a user-provided default constructor}}
};
struct { // expected-error {{anonymous structs and classes must be class members}}
@@ -9,7 +9,7 @@ struct { // expected-error {{anonymous structs and classes must be class members
struct E {
struct {
- S x; // expected-error {{anonymous struct member 'x' has a non-trivial constructor}}
+ S x; // expected-error {{anonymous struct member 'x' has a non-trivial constructor}}
};
static struct {
};