summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/constructor-init.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-26 00:31:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-26 00:31:33 +0000
commit0d1f3cb1b5d2c89d12d01bfa1b729a11b4864d49 (patch)
tree5ee4df5a90fbb60432c035c9aa272419ab1c34c4 /clang/test/CodeGenCXX/constructor-init.cpp
parent8d4677ad266da163861264717fc40e0bf24a9fea (diff)
downloadbcm5719-llvm-0d1f3cb1b5d2c89d12d01bfa1b729a11b4864d49.tar.gz
bcm5719-llvm-0d1f3cb1b5d2c89d12d01bfa1b729a11b4864d49.zip
Special members which are defaulted or deleted on their first declaration are
trivial if the implicit declaration would be. Don't forget to set the Trivial flag on the special member as well as on the class. It doesn't seem ideal that we have two separate mechanisms for storing this information, but this patch does not attempt to address that. This leaves us in an interesting position where the has_trivial_X trait for a class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'. This seems to be what the standard requires. llvm-svn: 151465
Diffstat (limited to 'clang/test/CodeGenCXX/constructor-init.cpp')
-rw-r--r--clang/test/CodeGenCXX/constructor-init.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/constructor-init.cpp b/clang/test/CodeGenCXX/constructor-init.cpp
index 6af5188a41f..9f808f6680e 100644
--- a/clang/test/CodeGenCXX/constructor-init.cpp
+++ b/clang/test/CodeGenCXX/constructor-init.cpp
@@ -201,7 +201,7 @@ namespace PR10720 {
pair2(const pair2&) = default;
};
- struct pair {
+ struct pair : X { // Make the copy constructor non-trivial, so we actually generate it.
int second[4];
// CHECK-PR10720: define linkonce_odr void @_ZN7PR107204pairC2ERKS0_
// CHECK-PR10720-NOT: ret
@@ -220,4 +220,3 @@ namespace PR10720 {
}
}
-
OpenPOWER on IntegriCloud