]> granicus.if.org Git - clang/commit
Promote null pointer constants used as arguments to variadic functions
authorReid Kleckner <reid@kleckner.net>
Fri, 10 Oct 2014 00:05:45 +0000 (00:05 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 10 Oct 2014 00:05:45 +0000 (00:05 +0000)
commitfb27bb07920650ca396009b4cc4e99333fc973a5
tree48b1805094322528d801f0f22bf252be7fffc80c
parent768b9300b5549a0d1a0ecb670c6e1d21d42cf9f7
Promote null pointer constants used as arguments to variadic functions

Make it possible to pass NULL through variadic functions on 64-bit
Windows targets. The Visual C++ headers define NULL to 0, when they
should define it to 0LL on Win64 so that NULL is a pointer-sized
integer.

Fixes PR20949.

Reviewers: thakis, rsmith

Differential Revision: http://reviews.llvm.org/D5480

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219456 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGen/variadic-null-win64.c [new file with mode: 0644]