Use nullptr instead of NULL for variadic sentinels
authorReid Kleckner <reid@kleckner.net>
Thu, 13 Nov 2014 22:55:19 +0000 (22:55 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 13 Nov 2014 22:55:19 +0000 (22:55 +0000)
commite094cca7f0acbabc3178559a9f457fc1b4882df4
treec9e78dd7113d2f1f44e49ba1bb61eecada25627f
parent7984fde2dc026af6695b6fd77f98d424d8945dbe
Use nullptr instead of NULL for variadic sentinels

Windows defines NULL to 0, which when used as an argument to a variadic
function, is not a null pointer constant. As a result, Clang's
-Wsentinel fires on this code. Using '0' would be wrong on most 64-bit
platforms, but both MSVC and Clang make it work on Windows. Sidestep the
issue with nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221940 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ShadowStackGC.cpp
lib/CodeGen/SjLjEHPrepare.cpp
lib/CodeGen/StackProtector.cpp
lib/IR/Constants.cpp
lib/IR/Instructions.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/MemorySanitizer.cpp
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
lib/Transforms/Utils/BuildLibCalls.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp