This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix a test error with condvars with trivial destruction
ClosedPublic

Authored by mstorsjo on Feb 26 2021, 3:30 AM.

Details

Summary

If the destructor is trivial (_LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION, the constructor always is), the compiler warns about the std::condition_variable being unused.

Add a cast to void to silence the warning about the object being unused.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Feb 26 2021, 3:30 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2021, 3:30 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
ldionne accepted this revision.Mar 2 2021, 9:22 AM
This revision is now accepted and ready to land.Mar 2 2021, 9:22 AM