[PATCH] D39033: [libcxx] [test] Tolerate [[nodiscard]] on STL functions in libcxx tests

Billy Robert O'Neal III via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 17 19:21:23 PDT 2017


BillyONeal created this revision.

I applied [[nodiscard]] to lots of things in MSVC++'s STL, which trips up some tests in libcxx. This change adds (void) casts or assertions as necessary to make [[nodiscard]] happy.


Repository:
  rL LLVM

https://reviews.llvm.org/D39033

Files:
  test/std/containers/associative/map/map.ops/count0.pass.cpp
  test/std/containers/associative/map/map.ops/count1.fail.cpp
  test/std/containers/associative/map/map.ops/count2.fail.cpp
  test/std/containers/associative/map/map.ops/count3.fail.cpp
  test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
  test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
  test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
  test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
  test/std/containers/associative/map/map.ops/find0.pass.cpp
  test/std/containers/associative/map/map.ops/find1.fail.cpp
  test/std/containers/associative/map/map.ops/find2.fail.cpp
  test/std/containers/associative/map/map.ops/find3.fail.cpp
  test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
  test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
  test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
  test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
  test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
  test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
  test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
  test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
  test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
  test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
  test/std/iterators/iterators.general/gcc_workaround.pass.cpp
  test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
  test/std/strings/basic.string/string.access/at.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
  test/std/strings/string.view/string.view.access/at.pass.cpp
  test/std/utilities/any/any.nonmembers/make_any.pass.cpp
  test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
  test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
  test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
  test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
  test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
  test/std/utilities/variant/variant.get/get_index.pass.cpp
  test/std/utilities/variant/variant.get/get_type.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39033.119421.patch
Type: text/x-patch
Size: 32028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171018/18aa4ab4/attachment-0001.bin>


More information about the cfe-commits mailing list