mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-23 11:59:52 +00:00
[libcxx] [test] Add (void) casts to operator new calls, to suppress warnings generated by [[nodiscard]].
This allows these tests to pass when compiled by MSVC++. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2cb7c6414
commit
82e238eecb
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new[](4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new[](4, std::align_val_t{4});
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new[](4, std::align_val_t{4}, std::nothrow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new[](4, std::nothrow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new(4, std::align_val_t{4});
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||
(void)::operator new(4, std::align_val_t{4}, std::nothrow);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user