Commit Graph

5 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 77ed8972fa [Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-literal-null-conversion in C code.
It is actually useful to warn in such cases, thanks to Dmitri for pushing on this and making us see the light!

Related to rdar://15925483 and rdar://15922612. The latter radar is where the usefulness of the warning is most clear.

llvm-svn: 201165
2014-02-11 17:53:22 +00:00
Argyrios Kyrtzidis 278c8d33e2 [Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used
by some projects in their null macro.

rdar://15925483

llvm-svn: 200521
2014-01-31 07:51:32 +00:00
Richard Smith e934d7c9f5 PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. This is a different, and more
targeted, approach than that in r194540.

llvm-svn: 195303
2013-11-21 01:53:02 +00:00
Joerg Sonnenberger 05bd2da328 Revert r194540, it breaks various C++ programs.
llvm-svn: 195126
2013-11-19 13:38:38 +00:00
Richard Smith 7309f60b9e PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. Patch by Ivan A. Kosarev!

llvm-svn: 194540
2013-11-13 01:24:28 +00:00