r200521 - [Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used

Dmitri Gribenko gribozavr at gmail.com
Sat Feb 1 18:05:40 PST 2014


On Fri, Jan 31, 2014 at 7:51 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> Author: akirtzidis
> Date: Fri Jan 31 01:51:32 2014
> New Revision: 200521
>
> URL: http://llvm.org/viewvc/llvm-project?rev=200521&view=rev
> Log:
> [Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used
> by some projects in their null macro.

Hi Argyrios,

I wonder, why isn't this handled automatically by
Expr::isNullPointerConstant -- it should be evaluating the whole
constant expression in this case.

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