Suppress clang warnings in some tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -52,6 +52,24 @@ void test_comparisons()
|
||||
assert(!(nullptr > p));
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma diagnostic ignored "-Wnull-conversion"
|
||||
#endif
|
||||
void test_nullptr_conversions() {
|
||||
{
|
||||
bool b = nullptr;
|
||||
assert(!b);
|
||||
}
|
||||
{
|
||||
bool b(nullptr);
|
||||
assert(!b);
|
||||
}
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -72,8 +90,5 @@ int main()
|
||||
test_comparisons<A*>();
|
||||
test_comparisons<void(*)()>();
|
||||
}
|
||||
{
|
||||
bool b = nullptr;
|
||||
assert(!b);
|
||||
}
|
||||
test_nullptr_conversions();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user