diff options
| author | Billy Robert O'Neal III <bion@microsoft.com> | 2017-11-21 21:37:26 +0000 |
|---|---|---|
| committer | Billy Robert O'Neal III <bion@microsoft.com> | 2017-11-21 21:37:26 +0000 |
| commit | ba40b0566ff0e835bc8234a4651e8cbf76181c3e (patch) | |
| tree | e06d8a46d0d11568b8e772d15a6d60fd220e9e2b /libcxx/test/std/iterators | |
| parent | 9dc54e25f007bf5309894337c8682a678deb7033 (diff) | |
| download | bcm5719-llvm-ba40b0566ff0e835bc8234a4651e8cbf76181c3e.tar.gz bcm5719-llvm-ba40b0566ff0e835bc8234a4651e8cbf76181c3e.zip | |
Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed as https://reviews.llvm.org/D40065
llvm-svn: 318804
Diffstat (limited to 'libcxx/test/std/iterators')
4 files changed, 11 insertions, 9 deletions
diff --git a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp index 335d8358ada..18c5943a46b 100644 --- a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp +++ b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp @@ -43,9 +43,9 @@ namespace Foo { int main(){ // Bug #28927 - shouldn't find these via ADL - (void) std::cbegin (Foo::FakeContainer()); - (void) std::cend (Foo::FakeContainer()); - (void) std::crbegin(Foo::FakeContainer()); - (void) std::crend (Foo::FakeContainer()); + TEST_IGNORE_NODISCARD std::cbegin (Foo::FakeContainer()); + TEST_IGNORE_NODISCARD std::cend (Foo::FakeContainer()); + TEST_IGNORE_NODISCARD std::crbegin(Foo::FakeContainer()); + TEST_IGNORE_NODISCARD std::crend (Foo::FakeContainer()); } #endif diff --git a/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp b/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp index 28a5e95f3ed..7578e718231 100644 --- a/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp +++ b/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp @@ -10,11 +10,12 @@ // Tests workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816. #include <string> +#include "test_macros.h" -void f(const std::string &s) { (void)s.begin(); } +void f(const std::string &s) { TEST_IGNORE_NODISCARD s.begin(); } #include <vector> -void AppendTo(const std::vector<char> &v) { (void)v.begin(); } +void AppendTo(const std::vector<char> &v) { TEST_IGNORE_NODISCARD v.begin(); } int main() {} diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp index 5b61a389513..e379b30575f 100644 --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp @@ -29,6 +29,7 @@ #include <iterator> #include <type_traits> #include <vector> +#include "test_macros.h" template <class C> struct find_members @@ -38,7 +39,7 @@ struct find_members void test() { this->container = 0; - (void)(this->iter == this->iter); + TEST_IGNORE_NODISCARD (this->iter == this->iter); } }; diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp index 71b0eaca737..99ff9641acd 100644 --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp @@ -43,8 +43,8 @@ int main() } { int a[] = {1,2,3,4}; - (void)std::make_move_iterator(a+4); - (void)std::make_move_iterator(a); // test for LWG issue 2061 + TEST_IGNORE_NODISCARD std::make_move_iterator(a+4); + TEST_IGNORE_NODISCARD std::make_move_iterator(a); // test for LWG issue 2061 } #if TEST_STD_VER > 14 |

