]> granicus.if.org Git - clang/commit
Use nullptr to silence -Wsentinel when self-hosting on Windows
authorReid Kleckner <reid@kleckner.net>
Mon, 1 Dec 2014 22:02:27 +0000 (22:02 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 1 Dec 2014 22:02:27 +0000 (22:02 +0000)
commit491c76a771212bcd05281d68d61369cd1a482e32
tree661a063f5d5986d8e9779f43ebc7c5292128bc59
parent778ed7b8122a2d05d58b1f693e927c518e74155d
Use nullptr to silence -Wsentinel when self-hosting on Windows

Richard rejected my Sema change to interpret an integer literal zero in
a varargs context as a null pointer, so -Wsentinel sees an integer
literal zero and fires off a warning. Only CodeGen currently knows that
it promotes integer literal zeroes in this context to pointer size on
Windows.  I didn't want to teach -Wsentinel about that compatibility
hack. Therefore, I'm migrating to C++11 nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223079 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CGException.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenTypes.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeGen/TargetInfo.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp