Addresses a problem brought up by Xavier here: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/46163
tl;dr: We get a warning on the following code
void foo(void *p) __attribute__((nonnull(1))) { if (p == NULL) {} // warning: always equal to false }
…But not this code:
void foo() __attribute__((returns_nonnull)); int main() { if (foo() == NULL) {} // no warning }
This patch makes us give a warning in the second case.