mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-21 23:30:38 +08:00
[libcxx] [test] Revert r356632 add (void) casts to operator new calls, to suppress warnings generated by [[nodiscard]]."
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new[](4);
|
::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new[](4, std::align_val_t{4});
|
::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new[](4, std::align_val_t{4}, std::nothrow);
|
::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new[](4, std::nothrow);
|
::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new(4, std::align_val_t{4});
|
::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
(void)::operator new(4, std::align_val_t{4}, std::nothrow);
|
::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user