jordan_rose added a comment.

This looks like it's only coming up for declarations. What about assignments?

  int x;
  int * _Nonnull p = &x;
  p = NULL; // warn here?



================
Comment at: lib/Sema/SemaExpr.cpp:7117
+    if (E && S.checkNonNullExpr(E))
+      return NullabilityKind::Nullable;
+
----------------
This isn't quite correct, unfortunately. `(_Nonnull id)nil` should be 
considered non-nullable, since it's the canonical way to avoid all these 
warnings. It might just be good enough to move this check below the 
`getNullability` one, though.


https://reviews.llvm.org/D22391



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

Reply via email to