[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ahatanak marked 2 inline comments as done. Closed by commit rL353459: [Sema][ObjC] Disallow non-trivial C struct fields in unions. (authored by ahatanak, committed by ). Herald added a project: LLVM. Herald added a subscribe

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Two minor tweaks, but otherwise LGTM. Comment at: lib/AST/Type.cpp:2273 +const RecordDecl *RD = QT->castAs()->getDecl(); +// C++ classes are ignored. +if (isa

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 185466. ahatanak added a comment. Make sure that volatile trivial fields in a struct don't cause Sema to emit a diagnostic. Simplify the code in `Sema::ActOnFields` . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55659/new/

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak planned changes to this revision. ahatanak added a comment. This patch is unnecessarily complicated and is not correct. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55659/new/ https://reviews.llvm.org/D55659 __

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Just to clarify, this patch doesn't change clang's handling of C++ unions that have non-static data members with non-trivial special member functions. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55659/new/ https://reviews.llvm.org/D55

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This patch fixes a bug where clang doesn’t reject union fields of non-trivial struct types: struct S0 { id x; }; struct S1 { id y;