[PATCH] Fix for Bug 19785 : -Wempty-body false negative on NULL check

Dmitri Gribenko gribozavr at gmail.com
Sat Mar 14 18:11:15 PDT 2015


On Sat, Mar 14, 2015 at 11:38 AM, Manasij Mukherjee
<manasij7479 at gmail.com> wrote:
> Hi,
> This patch fixes bug 19785 and adds a new test case for the problem.
> https://llvm.org/bugs/show_bug.cgi?id=19785
>
> In a case like:
> if ( ptr == NULL );
> the check used to consider the definition location of NULL, instead of the
> current line.

Thank you, committed in r232295.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list