Introduce Wzero-as-null-pointer-constant.
authorNico Weber <nicolasweber@gmx.de>
Fri, 5 May 2017 16:11:08 +0000 (16:11 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 5 May 2017 16:11:08 +0000 (16:11 +0000)
commitd7ba86b6bf54740dd4007e65a927151cb9f510b4
treef74f2de716ddadb5b2a99864578e05bb341aceb7
parent8b66b00ecd04c3d37fcfa6bfd03595365c7efd30
Introduce Wzero-as-null-pointer-constant.

Add an opt-in warning that fires when 0 is used as a null pointer.
gcc has this warning, and there's some demand for it.

https://reviews.llvm.org/D32914

llvm-svn: 302247
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/Sema.cpp
clang/test/SemaCXX/warn-zero-nullptr.cpp [new file with mode: 0644]