[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 15:39:21 PDT 2019
ahatanak added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:11144
+ // Ignore unavailable fields since they don't affect the triviality of the
+ // containing struct/union.
+ return FD->hasAttr<UnavailableAttr>();
----------------
rjmccall wrote:
> The "since" clause here is circular: this function *defines* what affects the triviality. The comment should talk about the motivations (e.g. fields that aren't available in particular language modes) and why this might be okay or is the best-available option (despite e.g. the potential for ABI incompatibility across language modes),
I commented on the ABI incompatibility issue in `ActOnFields` where the unavailable attribute is added to the field.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65256/new/
https://reviews.llvm.org/D65256
More information about the cfe-commits
mailing list