[PATCH] D24712: Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull.

John McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 19 15:57:49 PDT 2016

rjmccall added a comment.

The formation restrictions on ARC writeback conversions probably make this more-or-less impossible to test, but I can try to explain when they happen.  They happen when you have an argument of type "id __strong *" and pass it as a parameter of type "id __autoreleasing *".  __strong is the default for variables, and __autoreleasing is the default for pointer-to-id parameters, so basically you need something like:

  void test(int opaque) {
    extern void foo(id*);
    id x;
    id y;
    foo(opaque ? &x : &y);

or any other expression that forms a sufficiently complex argument of type "id __strong *" prior to writeback conversion.


More information about the cfe-commits mailing list