diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-28 20:41:50 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-28 20:41:50 +0000 |
commit | f56dc281ceea53f191ee3fb773a44aa4e5dc76ce (patch) | |
tree | 7d980657dfe8548ce2ef57ff4023d541a16bf7ac | |
parent | b18abd077e168f38acb1633c4101fbe3c8a18e41 (diff) |
NULL cannot be portably used as the last argument to a function with __attribute((sentinel)), even though it usually works. Use (void*)0 instead. PR11002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140720 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/Support/TypeBuilderTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/Support/TypeBuilderTest.cpp b/unittests/Support/TypeBuilderTest.cpp index 6e3fbc231f..20d0e73914 100644 --- a/unittests/Support/TypeBuilderTest.cpp +++ b/unittests/Support/TypeBuilderTest.cpp @@ -235,19 +235,19 @@ TEST(TypeBuilderTest, Extensions) { TypeBuilder<int, false>::get(getGlobalContext()), TypeBuilder<int*, false>::get(getGlobalContext()), TypeBuilder<void*[], false>::get(getGlobalContext()), - NULL)), + (void*)0)), (TypeBuilder<MyType*, false>::get(getGlobalContext()))); EXPECT_EQ(PointerType::getUnqual(StructType::get( TypeBuilder<types::i<32>, false>::get(getGlobalContext()), TypeBuilder<types::i<32>*, false>::get(getGlobalContext()), TypeBuilder<types::i<8>*[], false>::get(getGlobalContext()), - NULL)), + (void*)0)), (TypeBuilder<MyPortableType*, false>::get(getGlobalContext()))); EXPECT_EQ(PointerType::getUnqual(StructType::get( TypeBuilder<types::i<32>, false>::get(getGlobalContext()), TypeBuilder<types::i<32>*, false>::get(getGlobalContext()), TypeBuilder<types::i<8>*[], false>::get(getGlobalContext()), - NULL)), + (void*)0)), (TypeBuilder<MyPortableType*, true>::get(getGlobalContext()))); } |