diff options
author | Eric Fiselier <eric@efcs.ca> | 2018-02-02 22:39:59 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2018-02-02 22:39:59 +0000 |
commit | bfbafa541af87f5e1e7760adab1ffab06b00ca5a (patch) | |
tree | 8e2f07cc012f765e02450722cc073925ef646d0c /libcxx/test/std/utilities | |
parent | 60707939ded6603e4242f0bc361cfdc7f077d31f (diff) | |
download | bcm5719-llvm-bfbafa541af87f5e1e7760adab1ffab06b00ca5a.tar.gz bcm5719-llvm-bfbafa541af87f5e1e7760adab1ffab06b00ca5a.zip |
Fix has_unique_object_representation after Clang commit r324134.
Clang previously reported an empty union as having a unique object
representation. This was incorrect and was fixed in a recent Clang commit.
This patch fixes the libc++ tests.
llvm-svn: 324153
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp index e4a3d203ce7..52100c30404 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp @@ -55,7 +55,8 @@ class NotEmpty virtual ~NotEmpty(); }; -union Union {}; +union EmptyUnion {}; +struct NonEmptyUnion {int x; unsigned y;}; struct bit_zero { @@ -84,6 +85,7 @@ int main() { test_has_not_has_unique_object_representations<void>(); test_has_not_has_unique_object_representations<Empty>(); + test_has_not_has_unique_object_representations<EmptyUnion>(); test_has_not_has_unique_object_representations<NotEmpty>(); test_has_not_has_unique_object_representations<bit_zero>(); test_has_not_has_unique_object_representations<Abstract>(); @@ -97,7 +99,7 @@ int main() test_has_unique_object_representations<unsigned>(); - test_has_unique_object_representations<Union>(); + test_has_unique_object_representations<NonEmptyUnion>(); test_has_unique_object_representations<char[3]>(); test_has_unique_object_representations<char[]>(); |