mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 05:00:26 +00:00
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
This commit is contained in:
parent
b18abd077e
commit
f56dc281ce
@ -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())));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user