diff options
| author | Billy Robert O'Neal III <bion@microsoft.com> | 2017-11-15 07:40:37 +0000 |
|---|---|---|
| committer | Billy Robert O'Neal III <bion@microsoft.com> | 2017-11-15 07:40:37 +0000 |
| commit | 83252766f906799d68a46af39687d7a60fa8530a (patch) | |
| tree | c0885eb31dc65c8eccea6e06f5cad5d7fbf070ab /libcxx/test/std/containers/associative/multimap | |
| parent | ad51924eb4aec3f28a2f1a20b8b9040bfd4d3052 (diff) | |
| download | bcm5719-llvm-83252766f906799d68a46af39687d7a60fa8530a.tar.gz bcm5719-llvm-83252766f906799d68a46af39687d7a60fa8530a.zip | |
Tolerate [[nodiscard]] annotations in the STL. Reviewed as https://reviews.llvm.org/D39033
llvm-svn: 318276
Diffstat (limited to 'libcxx/test/std/containers/associative/multimap')
20 files changed, 37 insertions, 25 deletions
diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp index 289d405739a..db84dcf7b29 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp @@ -30,10 +30,10 @@ int main() { { typedef std::multimap<int, double, transparent_less> M; - M().count(C2Int{5}); + assert(M().count(C2Int{5}) == 0); } { typedef std::multimap<int, double, transparent_less_not_referenceable> M; - M().count(C2Int{5}); + assert(M().count(C2Int{5}) == 0); } } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp index 70464b12c74..bb15f67f971 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp @@ -33,6 +33,6 @@ int main() { typedef std::multimap<int, double, transparent_less_no_type> M; - M().count(C2Int{5}); + (void)M().count(C2Int{5}); } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp index ad15ff441d7..779af381835 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp @@ -33,6 +33,6 @@ int main() { typedef std::multimap<int, double, transparent_less_private> M; - M().count(C2Int{5}); + (void)M().count(C2Int{5}); } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp index 5e6c9ab6f96..6fb1f4dfbf9 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp @@ -33,6 +33,6 @@ int main() { typedef std::multimap<int, double, transparent_less_not_a_type> M; - M().count(C2Int{5}); + (void)M().count(C2Int{5}); } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp index 8cdd3c03372..0c093898d13 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp @@ -30,10 +30,16 @@ int main() { { typedef std::multimap<int, double, transparent_less> M; - M().equal_range(C2Int{5}); + typedef std::pair<typename M::iterator, typename M::iterator> P; + M example; + P result = example.equal_range(C2Int{5}); + assert(result.first == result.second); } { typedef std::multimap<int, double, transparent_less_not_referenceable> M; - M().equal_range(C2Int{5}); + typedef std::pair<typename M::iterator, typename M::iterator> P; + M example; + P result = example.equal_range(C2Int{5}); + assert(result.first == result.second); } } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp index a339467f739..20c30fe40a4 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp @@ -33,6 +33,6 @@ int main() { typedef std::multimap<int, double, transparent_less_no_type> M; - M().equal_range(C2Int{5}); + (void)M().equal_range(C2Int{5}); } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp index 633e0615bef..a36fc1f5413 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_private> M; - M().equal_range(C2Int{5}); + (void)M().equal_range(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp index 34b1b4b77fb..a2497761f1f 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_not_a_type> M; - M().equal_range(C2Int{5}); + (void)M().equal_range(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp index a06ec4d702d..0cff61131a0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp @@ -30,10 +30,12 @@ int main() { { typedef std::multimap<int, double, transparent_less> M; - M().find(C2Int{5}); + M example; + assert(example.find(C2Int{5}) == example.end()); } { typedef std::multimap<int, double, transparent_less_not_referenceable> M; - M().find(C2Int{5}); + M example; + assert(example.find(C2Int{5}) == example.end()); } } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp index bc3593292be..3df826797c4 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_no_type> M; - M().find(C2Int{5}); + (void)M().find(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp index 254f524afd5..32435f98c1a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_private> M; - M().find(C2Int{5}); + (void)M().find(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp index 2805f47598f..011c61c5455 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_not_a_type> M; - M().find(C2Int{5}); + (void)M().find(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp index 1000aa772b3..4a882af4ee0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp @@ -30,10 +30,12 @@ int main() { { typedef std::multimap<int, double, transparent_less> M; - M().lower_bound(C2Int{5}); + M example; + assert(example.lower_bound(C2Int{5}) == example.end()); } { typedef std::multimap<int, double, transparent_less_not_referenceable> M; - M().lower_bound(C2Int{5}); + M example; + assert(example.lower_bound(C2Int{5}) == example.end()); } } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp index 4b0db47872a..df8cb3844c6 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_no_type> M; - M().lower_bound(C2Int{5}); + (void)M().lower_bound(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp index 300364cffa2..9c7fdcdcbc9 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_private> M; - M().lower_bound(C2Int{5}); + (void)M().lower_bound(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp index 09963096fdf..34eeddc0158 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_not_a_type> M; - M().lower_bound(C2Int{5}); + (void)M().lower_bound(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp index 1a572e9c507..d7618141fe1 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp @@ -30,10 +30,12 @@ int main() { { typedef std::multimap<int, double, transparent_less> M; - M().upper_bound(C2Int{5}); + M example; + assert(example.upper_bound(C2Int{5}) == example.end()); } { typedef std::multimap<int, double, transparent_less_not_referenceable> M; - M().upper_bound(C2Int{5}); + M example; + assert(example.upper_bound(C2Int{5}) == example.end()); } } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp index 10e59c5e580..67a26a21397 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_no_type> M; - M().upper_bound(C2Int{5}); + (void)M().upper_bound(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp index 81ebbb832c0..35e79da517b 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_private> M; - M().upper_bound(C2Int{5}); + (void)M().upper_bound(C2Int{5}); } } #endif diff --git a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp index fe41315247e..eb3edb6a6e0 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp @@ -34,7 +34,7 @@ int main() { typedef std::multimap<int, double, transparent_less_not_a_type> M; - M().upper_bound(C2Int{5}); + (void)M().upper_bound(C2Int{5}); } } #endif |

