This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Add (void) casts to operator new calls, to suppress warnings generated by [[nodiscard]].
AbandonedPublic

Authored by BillyONeal on Mar 20 2019, 4:48 PM.

Details

Summary

Add (void) casts to operator new calls, to suppress warnings generated by [[nodiscard]].

This allows these tests to pass when compiled by MSVC++.

Diff Detail

Event Timeline

BillyONeal created this revision.Mar 20 2019, 4:48 PM

As an FYI, I committed this to subversion as r356632 since I haven't figured out the new git world order yet.....

This broke all the build bots, so I reverted the SVN change. I thought the nodiscard-ness was tested elsewhere but I'm not sure about interaction between this and -faligned-allocation.

BillyONeal abandoned this revision.Mar 22 2019, 12:06 PM

This didn't work out, we'll just skip the tests for MSVC++ for now.

This didn't work out, we'll just skip the tests for MSVC++ for now.

I'd like to understand what's breaking on MSVC so we can address the problem properly -- but I won't push if you just want to skip the tests.