diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-12-01 22:02:27 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-12-01 22:02:27 +0000 |
commit | ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f (patch) | |
tree | 390ec6b0d704161cbf2fcda48a5e03a247bfaecc /clang/lib/CodeGen/ItaniumCXXABI.cpp | |
parent | 337c4bd4abac1198312d5d009cf6185063c97812 (diff) | |
download | bcm5719-llvm-ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f.tar.gz bcm5719-llvm-ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f.zip |
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.
llvm-svn: 223079
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index c272091b79e..fd299d14c13 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -360,7 +360,7 @@ llvm::Type * ItaniumCXXABI::ConvertMemberPointerType(const MemberPointerType *MPT) { if (MPT->isMemberDataPointer()) return CGM.PtrDiffTy; - return llvm::StructType::get(CGM.PtrDiffTy, CGM.PtrDiffTy, NULL); + return llvm::StructType::get(CGM.PtrDiffTy, CGM.PtrDiffTy, nullptr); } /// In the Itanium and ARM ABIs, method pointers have the form: |