PR23416 points out that we currently diagnose nonnull properly on a block declaration, but not on a block expression. Specifically:
void(^bp)(int *) __attribute__((nonnull(1)));
void f() {
bp(0); // Diagnose this already
^(int *p1) __attribute__((nonnull(1))) {}(0); // Not diagnosing this
}
It seems reasonable and relatively straight-forward to support the
BlockExpr case as well. The attached patch is a stab at implementing
support for this, but since my ObjC-fu is weak (at best), I am
wondering if I'm missing something.
Thanks!
~Aaron
NonnullBlockExpr.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
