[PATCH] D72747: [objc_direct] Allow for direct messages be sent to `self` when it is a Class
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 13:56:13 PST 2020
arphaman added a comment.
Please add a test that exercises path without ARC enabled.
================
Comment at: clang/lib/Sema/SemaExprObjC.cpp:3019
+ if (ReceiverType->isObjCClassType() && !isImplicit &&
+ (!Receiver->isObjCSelfExpr() || !getLangOpts().ObjCAutoRefCount)) {
Diag(Receiver->getExprLoc(),
----------------
NIT: It feels easier to read if the condition is `&& !(Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount)`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72747/new/
https://reviews.llvm.org/D72747
More information about the cfe-commits
mailing list