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
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
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/
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
__
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
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;