[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 6 20:33:25 PDT 2018
rjmccall added a comment.
Just a couple minor requests; if you accept them, feel free to commit.
================
Comment at: include/clang/AST/Decl.h:3556
+ /// indirectly. This value is used only in C++.
+ APK_CannotPassInRegs,
+
----------------
I think it's probably worth spelling out why this can happen in C++, something like:
This value in required by C++ because, in uncommon situations, it is possible for a class to have only trivial copy/move constructors even when one of its subobjects has a non-trivial copy/move constructor (if e.g. the corresponding copy/move constructor in the derived class is deleted).
================
Comment at: include/clang/AST/Decl.h:3601
+ /// Represents the way this type is passed to a function.
+ ArgPassingKind ArgPassingStyle : 2;
+
----------------
I think maybe "ArgPassingRestrictions" would be better, since we don't necessarily honor this in the ABI.
Repository:
rC Clang
https://reviews.llvm.org/D45384
More information about the cfe-commits
mailing list