[PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator, where the lhs is nil and rhs an objC-method-call (or the other...

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 14:37:26 PDT 2016


dcoughlin requested changes to this revision.
dcoughlin added a comment.
This revision now requires changes to proceed.

Upon reflection, I don't think this is the right approach.

Desugaring any AttributedType in the return type seems like a really, really big hammer and could be an unexpected surprise for future attributed types where this is not the right behavior. I think a better approach for the nullability issue would be to update `lookThroughImplicitCasts()` in NullabilityChecker.cpp to look though `ExprWithCleanups` expressions just like it currently does for implicit casts.

What do you think?


https://reviews.llvm.org/D23236





More information about the cfe-commits mailing list