[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2018-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
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 ).

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2018-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
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 ___

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread John McCall via Phabricator via cfe-commits
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

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:1357 +(ReceiverType->isObjCClassOrClassKindOfType() || + ReceiverType->isObjCQualifiedClassType()) && +Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) {

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:1357 +(ReceiverType->isObjCClassOrClassKindOfType() || + ReceiverType->isObjCQualifiedClassType()) && +Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) {

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-14 Thread Alex Lorenz via Phabricator via 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

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-11-10 Thread Alex Lorenz via Phabricator via 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

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-10-24 Thread Alex Lorenz via Phabricator via 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

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
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