This allows these tests to pass when compiled by MSVC++.
llvm-svn: 356632
int main(int, char**)
{
- ::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
+ (void)::operator new[](4);
return 0;
}
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;
}
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;
}
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;
}
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;
}
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;
}