This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rC349841: [ObjC] Messages to self in class methods
that return instancetype should (authored by arphaman, committed by
).
arphaman marked an inline comment as done.
arphaman added a comment.
Herald added subscribers: dexonsmith, jkorous.
Fixed comment, will commit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D36790/new/
https://reviews.llvm.org/D36790
___
rjmccall added a comment.
LGTM outside of a comment request; please feel free to commit when you'd made
that change.
Comment at: lib/Sema/SemaExprObjC.cpp:1361
+// pointer to the parent interface of the method when ARC is enabled (
+// because self can't be reassigned
arphaman added inline comments.
Comment at: lib/Sema/SemaExprObjC.cpp:1357
+(ReceiverType->isObjCClassOrClassKindOfType() ||
+ ReceiverType->isObjCQualifiedClassType()) &&
+Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) {
arphaman updated this revision to Diff 127192.
arphaman marked an inline comment as done.
arphaman added a comment.
- Remove redundant checks.
- Remove the ARC-specific check.
https://reviews.llvm.org/D36790
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaExprObjC.cpp
rjmccall added inline comments.
Comment at: lib/Sema/SemaExprObjC.cpp:1357
+(ReceiverType->isObjCClassOrClassKindOfType() ||
+ ReceiverType->isObjCQualifiedClassType()) &&
+Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) {
arphaman added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36790
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arphaman added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36790
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arphaman added a comment.
In https://reviews.llvm.org/D36790#843450, @arphaman wrote:
> @rjmccall Do you think that the rules for the return types in overridden
> methods that return `instancetype` should be strengthened first? For example,
> if we have the following code:
>
> @interface
arphaman updated this revision to Diff 120157.
arphaman retitled this revision from "[ObjC] Messages to 'self' in class
methods should use class method dispatch to avoid multiple method ambiguities"
to "[ObjC] Messages to 'self' in class methods that return 'instancetype'
should use the pointer
10 matches
Mail list logo