diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-13 03:58:31 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-13 03:58:31 +0000 |
commit | 89e6e85f1a6c4972ece0b68950673735daec970a (patch) | |
tree | aa8460273809fbca68068e1a94c506f2f97f03c9 /test/CodeGenCXX/empty-union.cpp | |
parent | 9ec0ef31c3bc40612e8bf47bd7d265d5e7c01ff9 (diff) |
A base subobject type doesn't make sense for unions; don't try to compute it. Based on patch by Yin Ma. Fixes PR11751.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/empty-union.cpp')
-rw-r--r-- | test/CodeGenCXX/empty-union.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/CodeGenCXX/empty-union.cpp b/test/CodeGenCXX/empty-union.cpp index 118a0d29b4..7f3e6ccf50 100644 --- a/test/CodeGenCXX/empty-union.cpp +++ b/test/CodeGenCXX/empty-union.cpp @@ -1,10 +1,7 @@ // RUN: %clang_cc1 -emit-llvm -o - %s union sigval { }; +union sigval Test1; -union sigval sigev_value; - -int main() -{ - return sizeof(sigev_value); -} +union NonPODUnion { ~NonPODUnion(); }; +union NonPODUnion Test2; |