This is an archive of the discontinued LLVM Phabricator instance.

Add explicit (void) cast to unused unique_ptr::release() results
ClosedPublic

Authored by EricWF on Nov 13 2016, 11:22 PM.

Details

Summary

This patch adds explicit (void) casts to discarded release() calls to suppress -Wunused-result.

This patch fixes *all* warnings are generated as a result of [applying [[nodiscard]] within libc++](https://reviews.llvm.org/D26596).
Similar fixes were applied to Clang in r286796.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 77770.Nov 13 2016, 11:22 PM
EricWF retitled this revision from to Add explicit (void) cast to unused unique_ptr::release() results.
EricWF updated this object.
EricWF added a reviewer: chandlerc.
EricWF set the repository for this revision to rL LLVM.
EricWF added a subscriber: llvm-commits.
dberris accepted this revision.Nov 13 2016, 11:25 PM
dberris added a reviewer: dberris.
This revision is now accepted and ready to land.Nov 13 2016, 11:25 PM
EricWF closed this revision.Nov 13 2016, 11:35 PM