r200622 - [Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert its behavior for C++.

Dmitri Gribenko gribozavr at gmail.com
Sun Feb 2 05:45:14 PST 2014


On Sun, Feb 2, 2014 at 5:26 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> Author: akirtzidis
> Date: Sat Feb  1 23:26:43 2014
> New Revision: 200622
>
> URL: http://llvm.org/viewvc/llvm-project?rev=200622&view=rev
> Log:
> [Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert its behavior for C++.

Hi Argyrios,

I'd argue that we revert it entirely.  We could add a fixit to remove
a cast to assist those projects in fixing their code.  Unless I am
missing something, the cast to an integral type is completely
pointless here, and thus, I think, issuing the warning is a good thing
-- it helps people clean up their code.

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