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 when ARC is on).
+    if (Receiver && Receiver->isObjCSelfExpr()) {
----------------
You should update the comment to reflect that this isn't ARC-specific; I would 
suggest something like:

  // In a class method, class messages to 'self' that return instancetype can be
  // typed as the current class.  We can safely do this in ARC because self 
can't
  // be reassigned, and we do it unsafely outside of ARC because in practice 
people
  // never reassign self in class methods and there's some virtue in not being
  // aggressively pedantic.


https://reviews.llvm.org/D36790



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to