diff options
| author | Akira Hatanaka <ahatanaka@apple.com> | 2019-02-07 20:21:46 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@apple.com> | 2019-02-07 20:21:46 +0000 |
| commit | 5fbdccd834874aad04e21b0253084a27013a3f81 (patch) | |
| tree | 4710b8a956fff71b5c1b2acd718ce52187297103 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | fe3ac70b18ea2b614545734542944acf2f97bfcf (diff) | |
[Sema][ObjC] Disallow non-trivial C struct fields in unions.
This patch fixes a bug where clang doesn’t reject union fields of
non-trivial C struct types. For example:
```
// This struct is non-trivial under ARC.
struct S0 {
id x;
};
union U0 {
struct S0 s0; // clang should reject this.
struct S0 s1; // clang should reject this.
};
void test(union U0 a) {
// Previously, both 'a.s0.x' and 'a.s1.x' were released in this
// function.
}
```
rdar://problem/46677858
Differential Revision: https://reviews.llvm.org/D55659
llvm-svn: 353459
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
