[libcxx] r290459 - Fix unused parameters and variables
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 23 15:37:54 PST 2016
Author: ericwf
Date: Fri Dec 23 17:37:52 2016
New Revision: 290459
URL: http://llvm.org/viewvc/llvm-project?rev=290459&view=rev
Log:
Fix unused parameters and variables
Modified:
libcxx/trunk/include/__tree
libcxx/trunk/include/algorithm
libcxx/trunk/include/complex
libcxx/trunk/include/exception
libcxx/trunk/include/experimental/filesystem
libcxx/trunk/include/experimental/optional
libcxx/trunk/include/forward_list
libcxx/trunk/include/iterator
libcxx/trunk/include/list
libcxx/trunk/include/locale
libcxx/trunk/include/memory
libcxx/trunk/include/optional
libcxx/trunk/include/set
libcxx/trunk/include/stdexcept
libcxx/trunk/include/string
libcxx/trunk/include/unordered_map
libcxx/trunk/include/vector
libcxx/trunk/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp
libcxx/trunk/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
libcxx/trunk/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
libcxx/trunk/test/libcxx/numerics/c.math/ctgmath.pass.cpp
libcxx/trunk/test/libcxx/test/config.py
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/scary.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/scary.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp
libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp
libcxx/trunk/test/std/experimental/optional/optional.specalg/swap.pass.cpp
libcxx/trunk/test/std/experimental/string.view/string.view.ops/substr.pass.cpp
libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp
libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
libcxx/trunk/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp
libcxx/trunk/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
libcxx/trunk/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp
libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp
libcxx/trunk/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp
libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.async/async.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp
libcxx/trunk/test/std/thread/thread.mutex/thread.lock/types.pass.cpp
libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp
libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp
libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
libcxx/trunk/test/support/container_test_types.h
libcxx/trunk/test/support/controlled_allocators.hpp
libcxx/trunk/test/support/filesystem_test_helper.hpp
libcxx/trunk/test/support/nasty_containers.hpp
libcxx/trunk/test/support/uses_alloc_types.hpp
Modified: libcxx/trunk/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__tree?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/__tree (original)
+++ libcxx/trunk/include/__tree Fri Dec 23 17:37:52 2016
@@ -1428,7 +1428,7 @@ private:
__node_alloc() = __t.__node_alloc();
}
_LIBCPP_INLINE_VISIBILITY
- void __copy_assign_alloc(const __tree& __t, false_type) {}
+ void __copy_assign_alloc(const __tree&, false_type) {}
void __move_assign(__tree& __t, false_type);
void __move_assign(__tree& __t, true_type)
@@ -1448,7 +1448,7 @@ private:
_NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
{__node_alloc() = _VSTD::move(__t.__node_alloc());}
_LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__tree& __t, false_type) _NOEXCEPT {}
+ void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
__node_pointer __detach();
static __node_pointer __detach(__node_pointer);
Modified: libcxx/trunk/include/algorithm
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/algorithm?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/algorithm (original)
+++ libcxx/trunk/include/algorithm Fri Dec 23 17:37:52 2016
@@ -1754,7 +1754,9 @@ _BidirectionalIterator2
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIterator2 __result)
{
- return _VSTD::__copy_backward(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result));
+ return _VSTD::__copy_backward(__unwrap_iter(__first),
+ __unwrap_iter(__last),
+ __unwrap_iter(__result));
}
// copy_if
@@ -4895,7 +4897,8 @@ push_heap(_RandomAccessIterator __first,
template <class _Compare, class _RandomAccessIterator>
void
-__sift_down(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
+__sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/,
+ _Compare __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
_RandomAccessIterator __start)
{
Modified: libcxx/trunk/include/complex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/complex?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/complex (original)
+++ libcxx/trunk/include/complex Fri Dec 23 17:37:52 2016
@@ -844,7 +844,7 @@ imag(const complex<_Tp>& __c)
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
typename __libcpp_complex_overload_traits<_Tp>::_ValueType
-imag(_Tp __re)
+imag(_Tp)
{
return 0;
}
Modified: libcxx/trunk/include/exception
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/exception (original)
+++ libcxx/trunk/include/exception Fri Dec 23 17:37:52 2016
@@ -163,6 +163,7 @@ make_exception_ptr(_Ep __e) _NOEXCEPT
return current_exception();
}
#else
+ ((void)__e);
_VSTD::abort();
#endif
}
@@ -208,6 +209,9 @@ throw_with_nested (_Tp& __t, typename en
{
#ifndef _LIBCPP_NO_EXCEPTIONS
throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t));
+#else
+ ((void)__t);
+ // FIXME: Make this abort.
#endif
}
@@ -228,6 +232,9 @@ throw_with_nested (_Tp& __t, typename en
{
#ifndef _LIBCPP_NO_EXCEPTIONS
throw _VSTD::forward<_Tp>(__t);
+#else
+ ((void)__t);
+ // FIXME: Make this abort
#endif
}
Modified: libcxx/trunk/include/experimental/filesystem
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/filesystem?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/filesystem (original)
+++ libcxx/trunk/include/experimental/filesystem Fri Dec 23 17:37:52 2016
@@ -1218,14 +1218,18 @@ private:
template <class... _Args>
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
+#ifndef _LIBCPP_NO_EXCEPTIONS
void __throw_filesystem_error(_Args && ...__args)
{
-#ifndef _LIBCPP_NO_EXCEPTIONS
throw filesystem_error(std::forward<_Args>(__args)...);
+}
#else
+void __throw_filesystem_error(_Args&&...)
+{
_VSTD::abort();
-#endif
}
+#endif
+
// operational functions
Modified: libcxx/trunk/include/experimental/optional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/optional?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/optional (original)
+++ libcxx/trunk/include/experimental/optional Fri Dec 23 17:37:52 2016
@@ -721,7 +721,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
constexpr
bool
-operator<=(nullopt_t, const optional<_Tp>& __x) noexcept
+operator<=(nullopt_t, const optional<_Tp>&) noexcept
{
return true;
}
@@ -739,7 +739,7 @@ template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
constexpr
bool
-operator>(nullopt_t, const optional<_Tp>& __x) noexcept
+operator>(nullopt_t, const optional<_Tp>&) noexcept
{
return false;
}
Modified: libcxx/trunk/include/forward_list
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/forward_list?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/forward_list (original)
+++ libcxx/trunk/include/forward_list Fri Dec 23 17:37:52 2016
@@ -531,7 +531,7 @@ private:
}
_LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__forward_list_base& __x, false_type) _NOEXCEPT
+ void __move_assign_alloc(__forward_list_base&, false_type) _NOEXCEPT
{}
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__forward_list_base& __x, true_type)
@@ -1426,7 +1426,7 @@ forward_list<_Tp, _Alloc>::splice_after(
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
- forward_list& __x,
+ forward_list& /*__other*/,
const_iterator __i)
{
const_iterator __lm1 = _VSTD::next(__i);
@@ -1441,7 +1441,7 @@ forward_list<_Tp, _Alloc>::splice_after(
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
- forward_list& __x,
+ forward_list& /*__other*/,
const_iterator __f, const_iterator __l)
{
if (__f != __l && __p != __f)
Modified: libcxx/trunk/include/iterator
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/iterator (original)
+++ libcxx/trunk/include/iterator Fri Dec 23 17:37:52 2016
@@ -1751,13 +1751,13 @@ template <class _Cont>
constexpr auto size(const _Cont& __c) -> decltype(__c.size()) { return __c.size(); }
template <class _Tp, size_t _Sz>
-constexpr size_t size(const _Tp (&__array)[_Sz]) noexcept { return _Sz; }
+constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }
template <class _Cont>
constexpr auto empty(const _Cont& __c) -> decltype(__c.empty()) { return __c.empty(); }
template <class _Tp, size_t _Sz>
-constexpr bool empty(const _Tp (&__array)[_Sz]) noexcept { return false; }
+constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }
template <class _Ep>
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
Modified: libcxx/trunk/include/list
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/list?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/list (original)
+++ libcxx/trunk/include/list Fri Dec 23 17:37:52 2016
@@ -655,7 +655,7 @@ private:
}
_LIBCPP_INLINE_VISIBILITY
- void __copy_assign_alloc(const __list_imp& __c, false_type)
+ void __copy_assign_alloc(const __list_imp&, false_type)
{}
_LIBCPP_INLINE_VISIBILITY
@@ -666,7 +666,7 @@ private:
}
_LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__list_imp& __c, false_type)
+ void __move_assign_alloc(__list_imp&, false_type)
_NOEXCEPT
{}
};
@@ -2336,14 +2336,14 @@ list<_Tp, _Alloc>::__decrementable(const
template <class _Tp, class _Alloc>
bool
-list<_Tp, _Alloc>::__addable(const const_iterator* __i, ptrdiff_t __n) const
+list<_Tp, _Alloc>::__addable(const const_iterator*, ptrdiff_t) const
{
return false;
}
template <class _Tp, class _Alloc>
bool
-list<_Tp, _Alloc>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const
+list<_Tp, _Alloc>::__subscriptable(const const_iterator*, ptrdiff_t) const
{
return false;
}
Modified: libcxx/trunk/include/locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/locale?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/locale (original)
+++ libcxx/trunk/include/locale Fri Dec 23 17:37:52 2016
@@ -3932,7 +3932,8 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::u
streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
static_cast<streamsize>(__extbufend_ - __extbufnext_));
codecvt_base::result __r;
- state_type __svs = __st_;
+ // FIXME: Do we ever need to restore the state here?
+ //state_type __svs = __st_;
streamsize __nr = __bufptr_->sgetn(const_cast<char*>(__extbufnext_), __nmemb);
if (__nr != 0)
{
Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Fri Dec 23 17:37:52 2016
@@ -1605,7 +1605,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_t
is_trivially_move_constructible<_Tp>::value,
void
>::type
- __construct_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
+ __construct_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
{
ptrdiff_t _Np = __end1 - __begin1;
if (_Np > 0)
@@ -1635,7 +1635,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_t
is_trivially_move_constructible<_Tp>::value,
void
>::type
- __construct_range_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
+ __construct_range_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
{
typedef typename remove_const<_Tp>::type _Vp;
ptrdiff_t _Np = __end1 - __begin1;
@@ -1669,7 +1669,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_t
is_trivially_move_constructible<_Tp>::value,
void
>::type
- __construct_backward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __end2)
+ __construct_backward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __end2)
{
ptrdiff_t _Np = __end1 - __begin1;
__end2 -= _Np;
@@ -2109,7 +2109,7 @@ public:
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
_LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t __pc,
+ __libcpp_compressed_pair_imp(piecewise_construct_t,
tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args,
__tuple_indices<_I1...>,
@@ -2164,7 +2164,7 @@ public:
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
_LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t __pc,
+ __libcpp_compressed_pair_imp(piecewise_construct_t,
tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args,
__tuple_indices<_I1...>,
@@ -2220,7 +2220,7 @@ public:
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
_LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t __pc,
+ __libcpp_compressed_pair_imp(piecewise_construct_t,
tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args,
__tuple_indices<_I1...>,
@@ -2274,7 +2274,7 @@ public:
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
_LIBCPP_INLINE_VISIBILITY
- __libcpp_compressed_pair_imp(piecewise_construct_t __pc,
+ __libcpp_compressed_pair_imp(piecewise_construct_t,
tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args,
__tuple_indices<_I1...>,
Modified: libcxx/trunk/include/optional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/optional?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/optional (original)
+++ libcxx/trunk/include/optional Fri Dec 23 17:37:52 2016
@@ -1080,7 +1080,7 @@ operator<=(const optional<_Tp>& __x, nul
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
-operator<=(nullopt_t, const optional<_Tp>& __x) noexcept
+operator<=(nullopt_t, const optional<_Tp>&) noexcept
{
return true;
}
@@ -1096,7 +1096,7 @@ operator>(const optional<_Tp>& __x, null
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
-operator>(nullopt_t, const optional<_Tp>& __x) noexcept
+operator>(nullopt_t, const optional<_Tp>&) noexcept
{
return false;
}
Modified: libcxx/trunk/include/set
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/set?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/set (original)
+++ libcxx/trunk/include/set Fri Dec 23 17:37:52 2016
@@ -1023,7 +1023,7 @@ public:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __p, value_type&& __v)
- {return __tree_.__insert_multi(_VSTD::move(__v));}
+ {return __tree_.__insert_multi(__p, _VSTD::move(__v));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
_LIBCPP_INLINE_VISIBILITY
Modified: libcxx/trunk/include/stdexcept
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/stdexcept?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/stdexcept (original)
+++ libcxx/trunk/include/stdexcept Fri Dec 23 17:37:52 2016
@@ -191,7 +191,8 @@ void __throw_logic_error(const char*__ms
#ifndef _LIBCPP_NO_EXCEPTIONS
throw logic_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -201,7 +202,8 @@ void __throw_domain_error(const char*__m
#ifndef _LIBCPP_NO_EXCEPTIONS
throw domain_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -211,7 +213,8 @@ void __throw_invalid_argument(const char
#ifndef _LIBCPP_NO_EXCEPTIONS
throw invalid_argument(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -221,7 +224,8 @@ void __throw_length_error(const char*__m
#ifndef _LIBCPP_NO_EXCEPTIONS
throw length_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -231,7 +235,8 @@ void __throw_out_of_range(const char*__m
#ifndef _LIBCPP_NO_EXCEPTIONS
throw out_of_range(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -241,7 +246,8 @@ void __throw_range_error(const char*__ms
#ifndef _LIBCPP_NO_EXCEPTIONS
throw range_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -251,7 +257,8 @@ void __throw_overflow_error(const char*_
#ifndef _LIBCPP_NO_EXCEPTIONS
throw overflow_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
@@ -261,7 +268,8 @@ void __throw_underflow_error(const char*
#ifndef _LIBCPP_NO_EXCEPTIONS
throw underflow_error(__msg);
#else
- _VSTD::abort();
+ ((void)__msg);
+ _VSTD::abort();
#endif
}
Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Fri Dec 23 17:37:52 2016
@@ -2220,7 +2220,7 @@ bool __ptr_in_range (const _Tp* __p, con
}
template <class _Tp1, class _Tp2>
-bool __ptr_in_range (const _Tp1* __p, const _Tp2* __first, const _Tp2* __last)
+bool __ptr_in_range (const _Tp1*, const _Tp2*, const _Tp2*)
{
return false;
}
Modified: libcxx/trunk/include/unordered_map
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/unordered_map?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/unordered_map (original)
+++ libcxx/trunk/include/unordered_map Fri Dec 23 17:37:52 2016
@@ -922,6 +922,8 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__p);
#endif
return insert(__x).first;
}
@@ -946,6 +948,8 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__p);
#endif
return __table_.__insert_unique(_VSTD::move(__x)).first;
}
@@ -965,6 +969,8 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered_map::insert(const_iterator, value_type&&) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__p);
#endif
return insert(_VSTD::forward<_Pp>(__x)).first;
}
@@ -982,6 +988,8 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered_map::emplace_hint(const_iterator, args...) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__p);
#endif
return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
}
@@ -1015,8 +1023,10 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__h);
#endif
- return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
+ return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
}
template <class... _Args>
@@ -1027,6 +1037,8 @@ public:
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
" referring to this unordered_map");
+#else
+ ((void)__h);
#endif
return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first;
}
@@ -1057,15 +1069,17 @@ public:
template <class _Vp>
_LIBCPP_INLINE_VISIBILITY
- iterator insert_or_assign(const_iterator __h, const key_type& __k, _Vp&& __v)
+ iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v)
{
+ // FIXME: Add debug mode checking for the iterator input
return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first;
}
template <class _Vp>
_LIBCPP_INLINE_VISIBILITY
- iterator insert_or_assign(const_iterator __h, key_type&& __k, _Vp&& __v)
+ iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v)
{
+ // FIXME: Add debug mode checking for the iterator input
return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first;
}
#endif
Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Fri Dec 23 17:37:52 2016
@@ -821,30 +821,40 @@ private:
// We call annotatations only for the default Allocator because other allocators
// may not meet the AddressSanitizer alignment constraints.
// See the documentation for __sanitizer_annotate_contiguous_container for more details.
- void __annotate_contiguous_container
- (const void *__beg, const void *__end, const void *__old_mid, const void *__new_mid) const
- {
#ifndef _LIBCPP_HAS_NO_ASAN
+ void __annotate_contiguous_container(const void *__beg, const void *__end,
+ const void *__old_mid,
+ const void *__new_mid) const
+ {
+
if (__beg && is_same<allocator_type, __default_allocator_type>::value)
__sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
-#endif
}
-
- void __annotate_new(size_type __current_size) const
- {
+#else
+ _LIBCPP_INLINE_VISIBILITY
+ void __annotate_contiguous_container(const void*, const void*, const void*,
+ const void*) const {}
+#endif
+ _LIBCPP_INLINE_VISIBILITY
+ void __annotate_new(size_type __current_size) const {
__annotate_contiguous_container(data(), data() + capacity(),
data() + capacity(), data() + __current_size);
}
- void __annotate_delete() const
- {
+
+ _LIBCPP_INLINE_VISIBILITY
+ void __annotate_delete() const {
__annotate_contiguous_container(data(), data() + capacity(),
data() + size(), data() + capacity());
}
+
+ _LIBCPP_INLINE_VISIBILITY
void __annotate_increase(size_type __n) const
{
__annotate_contiguous_container(data(), data() + capacity(),
data() + size(), data() + size() + __n);
}
+
+ _LIBCPP_INLINE_VISIBILITY
void __annotate_shrink(size_type __old_size) const
{
__annotate_contiguous_container(data(), data() + capacity(),
@@ -869,8 +879,9 @@ private:
};
#else
struct __RAII_IncreaseAnnotator {
- inline __RAII_IncreaseAnnotator(const vector &, size_type __n = 1) {}
- inline void __done() {}
+ _LIBCPP_INLINE_VISIBILITY
+ __RAII_IncreaseAnnotator(const vector &, size_type = 1) {}
+ _LIBCPP_INLINE_VISIBILITY void __done() {}
};
#endif
@@ -2914,7 +2925,9 @@ typename enable_if
vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
clear();
- difference_type __n = _VSTD::distance(__first, __last);
+ difference_type __ns = _VSTD::distance(__first, __last);
+ _LIBCPP_ASSERT(__ns >= 0, "invalid range specified");
+ const size_t __n = static_cast<size_type>(__ns);
if (__n)
{
if (__n > capacity())
Modified: libcxx/trunk/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp Fri Dec 23 17:37:52 2016
@@ -28,4 +28,5 @@ int main()
C::iterator i = c.end();
T j = *i;
assert(false);
+ ((void)j);
}
Modified: libcxx/trunk/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp Fri Dec 23 17:37:52 2016
@@ -31,5 +31,5 @@ int main()
assert(myconv.converted() == 4);
// move construct a new converter and make sure the state is the same.
Myconv myconv2(std::move(myconv));
- assert(myconv2.converted() == 4);
+ assert(myconv2.converted() == old_converted);
}
Modified: libcxx/trunk/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp Fri Dec 23 17:37:52 2016
@@ -23,11 +23,10 @@
#include <cmath>
-constexpr bool a = std::__libcpp_isnan(0.);
-constexpr bool b = std::__libcpp_isinf(0.0);
-constexpr bool c = std::__libcpp_isfinite(0.0);
+static_assert(std::__libcpp_isnan(0.) == false, "");
+static_assert(std::__libcpp_isinf(0.0) == false, "");
+static_assert(std::__libcpp_isfinite(0.0) == true, "");
int main()
{
- return 0;
}
Modified: libcxx/trunk/test/libcxx/numerics/c.math/ctgmath.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/numerics/c.math/ctgmath.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/numerics/c.math/ctgmath.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/numerics/c.math/ctgmath.pass.cpp Fri Dec 23 17:37:52 2016
@@ -18,5 +18,7 @@
int main()
{
std::complex<double> cd;
+ ((void)cd);
double x = std::sin(0);
+ ((void)x);
}
Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Fri Dec 23 17:37:52 2016
@@ -659,11 +659,11 @@ class Configuration(object):
# These warnings should be enabled in order to support the MSVC
# team using the test suite; They enable the warnings below and
# expect the test suite to be clean.
- # FIXME: Re-enable this after fixing remaining occurrences.
self.cxx.addWarningFlagIfSupported('-Wno-sign-compare')
+ self.cxx.addWarningFlagIfSupported('-Wunused-variable')
+ self.cxx.addWarningFlagIfSupported('-Wunused-parameter')
# FIXME: Enable the two warnings below.
- self.cxx.addWarningFlagIfSupported('-Wno-unused-variable')
- self.cxx.addWarningFlagIfSupported('-Wno-unused-parameter')
+ self.cxx.addWarningFlagIfSupported('-Wno-conversion')
# TODO(EricWF) Remove the unused warnings once the test suite
# compiles clean with them.
self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
Modified: libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp Fri Dec 23 17:37:52 2016
@@ -266,6 +266,7 @@ void test_derived_from_ref_wrap() {
auto& ret2 = std::__invoke(get_fn, d);
auto& cret2 = std::__invoke_constexpr(get_fn, d);
assert(&ret2 == &x);
+ assert(&cret2 == &x);
auto& ret3 = std::__invoke(get_fn, r2);
assert(&ret3 == &x);
}
@@ -367,4 +368,4 @@ int main() {
test_derived_from_ref_wrap();
#endif
-}
\ No newline at end of file
+}
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/scary.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/scary.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/scary.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/scary.pass.cpp Fri Dec 23 17:37:52 2016
@@ -21,4 +21,5 @@ int main()
typedef std::unordered_multimap<int, int> M2;
M2::iterator i;
M1::iterator j = i;
+ ((void)j);
}
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp Fri Dec 23 17:37:52 2016
@@ -47,7 +47,10 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
assert(c.size() == 5);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
@@ -93,7 +96,10 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
assert(c.size() == 5);
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp Fri Dec 23 17:37:52 2016
@@ -45,7 +45,11 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
+
assert(c.size() == 5);
assert(c.count(1) == 2);
assert(c.count(2) == 1);
@@ -68,7 +72,10 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
assert(c.size() == 5);
assert(c.count(1) == 2);
assert(c.count(2) == 1);
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/scary.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/scary.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/scary.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/scary.pass.cpp Fri Dec 23 17:37:52 2016
@@ -21,4 +21,5 @@ int main()
typedef std::unordered_multiset<int> M2;
M2::iterator i;
M1::iterator j = i;
+ ((void)j);
}
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp Fri Dec 23 17:37:52 2016
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <unordered_set>
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
@@ -29,23 +31,12 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_compare<std::equal_to<int> >,
test_allocator<int>
> C;
- typedef int P;
- P a[] =
- {
- P(1),
- P(2),
- P(3),
- P(4),
- P(1),
- P(2)
- };
C c0(7,
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9),
@@ -105,23 +96,12 @@ int main()
assert(c0.empty());
}
-#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_compare<std::equal_to<int> >,
min_allocator<int>
> C;
- typedef int P;
- P a[] =
- {
- P(1),
- P(2),
- P(3),
- P(4),
- P(1),
- P(2)
- };
C c0(7,
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9),
@@ -181,7 +161,6 @@ int main()
assert(c0.empty());
}
-#endif
#if _LIBCPP_DEBUG >= 1
{
std::unordered_multiset<int> s1 = {1, 2, 3};
@@ -193,5 +172,4 @@ int main()
assert(s2.size() == 2);
}
#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
Modified: libcxx/trunk/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp Fri Dec 23 17:37:52 2016
@@ -45,7 +45,11 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
+
assert(c.size() == 3);
assert(c.count(1) == 1);
assert(c.count(3) == 1);
@@ -66,7 +70,11 @@ int main()
};
C c(a, a + sizeof(a)/sizeof(a[0]));
C::const_iterator i = c.find(2);
+ C::const_iterator i_next = i;
+ ++i_next;
C::iterator j = c.erase(i);
+ assert(j == i_next);
+
assert(c.size() == 3);
assert(c.count(1) == 1);
assert(c.count(3) == 1);
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp Fri Dec 23 17:37:52 2016
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <unordered_set>
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
@@ -29,23 +31,12 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_compare<std::equal_to<int> >,
test_allocator<int>
> C;
- typedef int P;
- P a[] =
- {
- P(1),
- P(2),
- P(3),
- P(4),
- P(1),
- P(2)
- };
C c0(7,
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9),
@@ -105,23 +96,12 @@ int main()
assert(c0.empty());
}
-#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_compare<std::equal_to<int> >,
min_allocator<int>
> C;
- typedef int P;
- P a[] =
- {
- P(1),
- P(2),
- P(3),
- P(4),
- P(1),
- P(2)
- };
C c0(7,
test_hash<std::hash<int> >(8),
test_compare<std::equal_to<int> >(9),
@@ -181,7 +161,6 @@ int main()
assert(c0.empty());
}
-#endif
#if _LIBCPP_DEBUG >= 1
{
std::unordered_set<int> s1 = {1, 2, 3};
@@ -193,5 +172,4 @@ int main()
assert(s2.size() == 2);
}
#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
Modified: libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp Fri Dec 23 17:37:52 2016
@@ -98,6 +98,8 @@ void checkThrows(any& a)
} catch (...) {
assert(false);
}
+#else
+ ((void)a);
#endif
}
@@ -176,7 +178,6 @@ void test_cast_to_value() {
Type::reset();
{
any a((Type(42)));
- any const& ca = a;
assert(Type::count == 1);
assert(Type::copied == 0);
assert(Type::moved == 1);
Modified: libcxx/trunk/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp Fri Dec 23 17:37:52 2016
@@ -40,7 +40,6 @@ void doIOTest() {
using namespace fs;
using Ptr = const CharT*;
using StrStream = std::basic_stringstream<CharT>;
- const char* const InCStr = InStr;
const Ptr E = OutStr;
const path p((const char*)InStr);
StrStream ss;
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp Fri Dec 23 17:37:52 2016
@@ -60,6 +60,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)t); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp Fri Dec 23 17:37:52 2016
@@ -62,6 +62,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)t); ((void)ec);
return true;
#endif
};
@@ -138,7 +139,6 @@ TEST_CASE(test_attributes_get_copied)
const path file = env.create_file("file1", 42);
const path dest = env.make_env_path("file2");
auto st = status(file);
- perms default_perms = st.permissions();
perms new_perms = perms::owner_read;
permissions(file, new_perms);
std::error_code ec;
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp Fri Dec 23 17:37:52 2016
@@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)t); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp Fri Dec 23 17:37:52 2016
@@ -37,21 +37,6 @@ TEST_CASE(test_signatures)
TEST_CASE(test_error_reporting)
{
- auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
- {
-#ifndef TEST_HAS_NO_EXCEPTIONS
- try {
- fs::create_directory_symlink(f, t);
- return true;
- } catch (filesystem_error const& err) {
- return err.path1() == f
- && err.code() == ec;
- }
-#else
- return true;
-#endif
- };
-
scoped_test_env env;
const path file = env.create_file("file1", 42);
const path file2 = env.create_file("file2", 55);
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp Fri Dec 23 17:37:52 2016
@@ -36,21 +36,6 @@ TEST_CASE(test_signatures)
TEST_CASE(test_error_reporting)
{
- auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
- {
-#ifndef TEST_HAS_NO_EXCEPTIONS
- try {
- fs::create_hard_link(f, t);
- return true;
- } catch (filesystem_error const& err) {
- return err.path1() == f
- && err.code() == ec;
- }
-#else
- return true;
-#endif
- };
-
scoped_test_env env;
const path file = env.create_file("file1", 42);
const path file2 = env.create_file("file2", 55);
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp Fri Dec 23 17:37:52 2016
@@ -37,21 +37,6 @@ TEST_CASE(test_signatures)
TEST_CASE(test_error_reporting)
{
- auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
- {
-#ifndef TEST_HAS_NO_EXCEPTIONS
- try {
- fs::create_symlink(f, t);
- return true;
- } catch (filesystem_error const& err) {
- return err.path1() == f
- && err.code() == ec;
- }
-#else
- return true;
-#endif
- };
-
scoped_test_env env;
const path file = env.create_file("file1", 42);
const path file2 = env.create_file("file2", 55);
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp Fri Dec 23 17:37:52 2016
@@ -53,6 +53,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)opts); ((void)ec);
return true;
#endif
};
@@ -116,7 +117,7 @@ TEST_CASE(basic_permissions_test)
permissions(TC.p, TC.set_perms, ec);
TEST_CHECK(!ec);
auto pp = status(TC.p).permissions();
- TEST_CHECK(status(TC.p).permissions() == TC.expected);
+ TEST_CHECK(pp == TC.expected);
}
}
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp Fri Dec 23 17:37:52 2016
@@ -51,6 +51,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp Fri Dec 23 17:37:52 2016
@@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp Fri Dec 23 17:37:52 2016
@@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp Fri Dec 23 17:37:52 2016
@@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)t); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp Fri Dec 23 17:37:52 2016
@@ -52,6 +52,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)s); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp Fri Dec 23 17:37:52 2016
@@ -57,6 +57,7 @@ TEST_CASE(test_error_reporting)
&& err.code() == ec;
}
#else
+ ((void)f); ((void)ec);
return true;
#endif
};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp Fri Dec 23 17:37:52 2016
@@ -43,7 +43,7 @@ template <typename T> struct MyHash {
};
template <typename Iter1, typename Iter2>
-void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
+void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) {
std::experimental::boyer_moore_searcher<Iter2,
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
s{b2, e2};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp Fri Dec 23 17:37:52 2016
@@ -54,10 +54,12 @@ unsigned count_equal::count = 0;
template <typename Iter1, typename Iter2>
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
+ count_equal::count = 0;
std::experimental::boyer_moore_searcher<Iter2,
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
count_equal>
s{b2, e2};
+ assert(count_equal::count <= max_count);
assert(result == std::experimental::search(b1, e1, s));
}
@@ -78,7 +80,10 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -93,6 +98,7 @@ test()
const unsigned sh = sizeof(ih)/sizeof(ih[0]);
int ii[] = {1, 1, 2};
do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3);
+
}
template <class Iter1, class Iter2>
@@ -112,7 +118,10 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp Fri Dec 23 17:37:52 2016
@@ -54,7 +54,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
count_equal::count = 0;
assert(result == std::experimental::search(b1, e1, s));
-// assert(count_equal::count <= max_count);
+ assert(count_equal::count <= max_count);
}
template <class Iter1, class Iter2>
@@ -74,7 +74,10 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -108,7 +111,8 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp Fri Dec 23 17:37:52 2016
@@ -42,7 +42,7 @@ template <typename T> struct MyHash {
};
template <typename Iter1, typename Iter2>
-void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
+void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) {
std::experimental::boyer_moore_horspool_searcher<Iter2,
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
s{b2, e2};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp Fri Dec 23 17:37:52 2016
@@ -57,7 +57,9 @@ void do_search(Iter1 b1, Iter1 e1, Iter2
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
count_equal>
s{b2, e2};
+ count_equal::count = 0;
assert(result == std::experimental::search(b1, e1, s));
+ assert(count_equal::count <= max_count);
}
template <class Iter1, class Iter2>
@@ -77,7 +79,8 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -111,7 +114,8 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp Fri Dec 23 17:37:52 2016
@@ -53,7 +53,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
count_equal::count = 0;
assert(result == std::experimental::search(b1, e1, s));
-// assert(count_equal::count <= max_count);
+ assert(count_equal::count <= max_count);
}
template <class Iter1, class Iter2>
@@ -73,7 +73,8 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -107,7 +108,8 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
+ // FIXME: The max_count for this search should be 'sa'
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp Fri Dec 23 17:37:52 2016
@@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2
template <typename Input1, typename Input2 = Input1>
-constexpr bool do_test(int dummy = 0)
+constexpr bool do_test(int = 0)
{
using S1 = typename std::make_signed<Input1>::type;
using S2 = typename std::make_signed<Input2>::type;
Modified: libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp Fri Dec 23 17:37:52 2016
@@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2
template <typename Input1, typename Input2 = Input1>
-constexpr bool do_test(int dummy = 0)
+constexpr bool do_test(int = 0)
{
using S1 = typename std::make_signed<Input1>::type;
using S2 = typename std::make_signed<Input2>::type;
Modified: libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp Fri Dec 23 17:37:52 2016
@@ -55,7 +55,7 @@ public:
class Z
{
public:
- Z(int i) {TEST_THROW(6);}
+ Z(int) {TEST_THROW(6);}
};
Modified: libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp Fri Dec 23 17:37:52 2016
@@ -60,7 +60,7 @@ public:
Z(Z&&) {TEST_THROW(7);}
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
- friend void swap(Z& x, Z& y) {TEST_THROW(6);}
+ friend void swap(Z&, Z&) {TEST_THROW(6);}
};
struct ConstSwappable {
Modified: libcxx/trunk/test/std/experimental/optional/optional.specalg/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/optional/optional.specalg/swap.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/optional/optional.specalg/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/optional/optional.specalg/swap.pass.cpp Fri Dec 23 17:37:52 2016
@@ -59,7 +59,7 @@ public:
Z(Z&&) {TEST_THROW(7);}
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
- friend void swap(Z& x, Z& y) {TEST_THROW(6);}
+ friend void swap(Z&, Z&) {TEST_THROW(6);}
};
int main()
Modified: libcxx/trunk/test/std/experimental/string.view/string.view.ops/substr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/string.view/string.view.ops/substr.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/string.view/string.view.ops/substr.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/string.view/string.view.ops/substr.pass.cpp Fri Dec 23 17:37:52 2016
@@ -27,6 +27,7 @@ void test1 ( std::experimental::basic_st
try {
std::experimental::basic_string_view<CharT> sv1 = sv.substr(pos, n);
assert(false);
+ ((void)sv1);
} catch (const std::out_of_range&) {
return;
} catch (...) {
Modified: libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp Fri Dec 23 17:37:52 2016
@@ -25,4 +25,5 @@ int main() {
P p1(2);
P p2(std::move(p1));
+ assert(*p2 == 2);
}
Modified: libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp Fri Dec 23 17:37:52 2016
@@ -24,7 +24,7 @@ template <> struct hash<X>
{
typedef X first_argument_type;
- size_t operator()(const first_argument_type& x1) const
+ size_t operator()(const first_argument_type&) const
{
return 99;
}
Modified: libcxx/trunk/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp Fri Dec 23 17:37:52 2016
@@ -18,4 +18,5 @@
int main()
{
std::ratio<100> x;
+ ((void)x);
}
Modified: libcxx/trunk/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp Fri Dec 23 17:37:52 2016
@@ -13,5 +13,6 @@
int main()
{
- std::experimental::erased_type e;
+ std::experimental::erased_type e;
+ ((void)e);
}
Modified: libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp Fri Dec 23 17:37:52 2016
@@ -168,9 +168,6 @@ int main()
catch (std::ios_base::failure&)
{
}
-#else
- ios1.copyfmt(ios2);
-#endif
assert(ios1.rdstate() == std::ios::eofbit);
assert(ios1.rdbuf() == &sb1);
assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
@@ -193,4 +190,5 @@ int main()
assert(ios1.pword(1) == &d2);
assert(ios1.tie() == (std::ostream*)2);
assert(ios1.fill() == '2');
+#endif
}
Modified: libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp Fri Dec 23 17:37:52 2016
@@ -23,4 +23,5 @@ int main()
std::ostream_iterator<int> i(outf);
std::ostream_iterator<int> j = i;
assert(outf.good());
+ ((void)j);
}
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp Fri Dec 23 17:37:52 2016
@@ -48,7 +48,7 @@ void operator delete(void* p, const std:
std::free(p);
}
-void operator delete [] (void* p, std::align_val_t a) TEST_NOEXCEPT
+void operator delete [] (void* p, std::align_val_t) TEST_NOEXCEPT
{
++aligned_delete_called;
std::free(p);
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp Fri Dec 23 17:37:52 2016
@@ -55,7 +55,7 @@ void* operator new[](std::size_t s, std:
return DummyData;
}
-void operator delete[](void* p, std::align_val_t a) TEST_NOEXCEPT
+void operator delete[](void* p, std::align_val_t) TEST_NOEXCEPT
{
assert(new_called == 1);
--new_called;
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp Fri Dec 23 17:37:52 2016
@@ -49,7 +49,7 @@ void operator delete(void* p, const std:
std::free(p);
}
-void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT
+void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT
{
++aligned_delete_called;
std::free(p);
Modified: libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp Fri Dec 23 17:37:52 2016
@@ -55,7 +55,7 @@ void* operator new(std::size_t s, std::a
return DummyData;
}
-void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT
+void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT
{
assert(new_called == 1);
--new_called;
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp Fri Dec 23 17:37:52 2016
@@ -27,7 +27,6 @@
int main()
{
-//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef std::codecvt<char16_t, char, std::mbstate_t> F;
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
@@ -38,5 +37,5 @@ int main()
assert(std::has_facet<F>(l));
const F& f = std::use_facet<F>(l);
(void)F::id;
-//#endif
+ ((void)f);
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp Fri Dec 23 17:37:52 2016
@@ -27,7 +27,6 @@
int main()
{
-//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef std::codecvt<char32_t, char, std::mbstate_t> F;
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
@@ -38,5 +37,5 @@ int main()
assert(std::has_facet<F>(l));
const F& f = std::use_facet<F>(l);
(void)F::id;
-//#endif
+ ((void)f);
}
Modified: libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp Fri Dec 23 17:37:52 2016
@@ -24,5 +24,6 @@ int main()
{
B b;
std::mbstate_t s = b.state();
+ ((void)s);
}
}
Modified: libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp Fri Dec 23 17:37:52 2016
@@ -22,4 +22,5 @@ int main()
typedef std::wstring_convert<Codecvt> Myconv;
Myconv myconv;
std::mbstate_t s = myconv.state();
+ ((void)s);
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp Fri Dec 23 17:37:52 2016
@@ -35,7 +35,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp Fri Dec 23 17:37:52 2016
@@ -35,7 +35,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp Fri Dec 23 17:37:52 2016
@@ -34,7 +34,6 @@ test()
void test_edges()
{
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp Fri Dec 23 17:37:52 2016
@@ -36,7 +36,6 @@ test()
void test_edges()
{
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp Fri Dec 23 17:37:52 2016
@@ -36,7 +36,6 @@ test()
void test_edges()
{
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp Fri Dec 23 17:37:52 2016
@@ -36,7 +36,6 @@ test()
void test_edges()
{
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp Fri Dec 23 17:37:52 2016
@@ -35,7 +35,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp Fri Dec 23 17:37:52 2016
@@ -35,7 +35,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp Fri Dec 23 17:37:52 2016
@@ -36,7 +36,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp Fri Dec 23 17:37:52 2016
@@ -35,7 +35,6 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const double pi = std::atan2(+0., -0.);
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
Modified: libcxx/trunk/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp Fri Dec 23 17:37:52 2016
@@ -45,7 +45,6 @@ int main()
// Test return value of assignment.
{
int a1[] = {0, 1, 2};
- int a2[] = {3, 4, 3};
std::valarray<int> v1(a1, 3);
std::slice_array<int> s1 = v1[std::slice(1, 1, 1)];
std::slice_array<int> s2 = v1[std::slice(0, 1, 1)];
Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp Fri Dec 23 17:37:52 2016
@@ -41,7 +41,6 @@ int main()
typedef int T;
T a1[] = {1, 2, 3, 4, 5};
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
- const unsigned N2 = 0;
std::valarray<T> v1(a1, N1);
std::valarray<T> v2;
std::valarray<T> v1_save = v1;
@@ -57,7 +56,6 @@ int main()
{
typedef int T;
T a2[] = {6, 7, 8, 9, 10, 11, 12};
- const unsigned N1 = 0;
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
std::valarray<T> v1;
std::valarray<T> v2(a2, N2);
@@ -73,8 +71,6 @@ int main()
}
{
typedef int T;
- const unsigned N1 = 0;
- const unsigned N2 = 0;
std::valarray<T> v1;
std::valarray<T> v2;
std::valarray<T> v1_save = v1;
Modified: libcxx/trunk/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp Fri Dec 23 17:37:52 2016
@@ -43,7 +43,6 @@ int main()
typedef int T;
T a1[] = {1, 2, 3, 4, 5};
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
- const unsigned N2 = 0;
std::valarray<T> v1(a1, N1);
std::valarray<T> v2;
std::valarray<T> v1_save = v1;
@@ -59,7 +58,6 @@ int main()
{
typedef int T;
T a2[] = {6, 7, 8, 9, 10, 11, 12};
- const unsigned N1 = 0;
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
std::valarray<T> v1;
std::valarray<T> v2(a2, N2);
@@ -75,8 +73,6 @@ int main()
}
{
typedef int T;
- const unsigned N1 = 0;
- const unsigned N2 = 0;
std::valarray<T> v1;
std::valarray<T> v2;
std::valarray<T> v1_save = v1;
Modified: libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp Fri Dec 23 17:37:52 2016
@@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2
template <typename Input1, typename Input2 = Input1>
-constexpr bool do_test(int dummy = 0)
+constexpr bool do_test(int = 0)
{
using S1 = typename std::make_signed<Input1>::type;
using S2 = typename std::make_signed<Input2>::type;
Modified: libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp Fri Dec 23 17:37:52 2016
@@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2
template <typename Input1, typename Input2 = Input1>
-constexpr bool do_test(int dummy = 0)
+constexpr bool do_test(int = 0)
{
using S1 = typename std::make_signed<Input1>::type;
using S2 = typename std::make_signed<Input2>::type;
Modified: libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.device/ctor.pass.cpp Fri Dec 23 17:37:52 2016
@@ -49,6 +49,8 @@ void check_random_device_invalid(const s
LIBCPP_ASSERT(false);
} catch (const std::system_error&) {
}
+#else
+ ((void)token);
#endif
}
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp Fri Dec 23 17:37:52 2016
@@ -187,7 +187,7 @@ test4()
kurtosis += d2 * d2;
}
var /= u.size();
- double dev = std::sqrt(var);
+ //double dev = std::sqrt(var);
// In this case:
// skew computes to 0./0. == nan
// kurtosis computes to 0./0. == nan
@@ -236,7 +236,7 @@ test5()
kurtosis += d2 * d2;
}
var /= u.size();
- double dev = std::sqrt(var);
+// double dev = std::sqrt(var);
// In this case:
// skew computes to 0./0. == nan
// kurtosis computes to 0./0. == nan
@@ -389,7 +389,7 @@ test9()
kurtosis += d2 * d2;
}
var /= u.size();
- double dev = std::sqrt(var);
+// double dev = std::sqrt(var);
// In this case:
// skew computes to 0./0. == nan
// kurtosis computes to 0./0. == nan
@@ -438,7 +438,7 @@ test10()
kurtosis += d2 * d2;
}
var /= u.size();
- double dev = std::sqrt(var);
+// double dev = std::sqrt(var);
// In this case:
// skew computes to 0./0. == nan
// kurtosis computes to 0./0. == nan
@@ -487,7 +487,7 @@ test11()
kurtosis += d2 * d2;
}
var /= u.size();
- double dev = std::sqrt(var);
+// double dev = std::sqrt(var);
// In this case:
// skew computes to 0./0. == nan
// kurtosis computes to 0./0. == nan
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp Fri Dec 23 17:37:52 2016
@@ -193,8 +193,8 @@ test4()
kurtosis -= 3;
double x_mean = d.k() * (1 - d.p()) / d.p();
double x_var = x_mean / d.p();
- double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p()));
- double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p()));
+// double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p()));
+// double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p()));
assert(mean == x_mean);
assert(var == x_var);
}
Modified: libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp Fri Dec 23 17:37:52 2016
@@ -617,11 +617,12 @@ int main()
}
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
*/ {
+ /*
std::cmatch m;
const char s[] = "m";
- /* assert(std::regex_match(s, m,*/ std::regex("[a[=M=]z]"/*,
- std::regex_constants::awk*/);//));
-/* assert(m.size() == 1);
+ assert(std::regex_match(s, m, std::regex("[a[=M=]z]",
+ std::regex_constants::awk);
+ assert(m.size() == 1);
assert(!m.prefix().matched);
assert(m.prefix().first == s);
assert(m.prefix().second == m[0].first);
Modified: libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp Fri Dec 23 17:37:52 2016
@@ -37,6 +37,8 @@ extern "C" void LLVMFuzzerTestOneInput(c
}
catch (std::regex_error &) {}
}
+#else
+ ((void)data);
#endif
}
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp Fri Dec 23 17:37:52 2016
@@ -18,7 +18,6 @@
int main()
{
- char s1[] = {1, 2, 3};
char s2[3] = {0};
assert(std::char_traits<char>::assign(s2, 3, char(5)) == s2);
assert(s2[0] == char(5));
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp Fri Dec 23 17:37:52 2016
@@ -19,7 +19,6 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
- char16_t s1[] = {1, 2, 3};
char16_t s2[3] = {0};
assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2);
assert(s2[0] == char16_t(5));
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp Fri Dec 23 17:37:52 2016
@@ -19,7 +19,6 @@
int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
- char32_t s1[] = {1, 2, 3};
char32_t s2[3] = {0};
assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2);
assert(s2[0] == char32_t(5));
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp Fri Dec 23 17:37:52 2016
@@ -18,7 +18,6 @@
int main()
{
- wchar_t s1[] = {1, 2, 3};
wchar_t s2[3] = {0};
assert(std::char_traits<wchar_t>::assign(s2, 3, wchar_t(5)) == s2);
assert(s2[0] == wchar_t(5));
Modified: libcxx/trunk/test/std/thread/futures/futures.async/async.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.async/async.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.async/async.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.async/async.pass.cpp Fri Dec 23 17:37:52 2016
@@ -72,7 +72,7 @@ std::unique_ptr<int> f4(std::unique_ptr<
void f5(int j)
{
std::this_thread::sleep_for(ms(200));
- TEST_THROW(j);
+ TEST_THROW(j); ((void)j);
}
template <class Ret, class CheckLamdba, class ...Args>
Modified: libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp Fri Dec 23 17:37:52 2016
@@ -22,7 +22,6 @@
void func(std::promise<int> p)
{
- const int i = 5;
p.set_exception_at_thread_exit(std::make_exception_ptr(3));
}
Modified: libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp Fri Dec 23 17:37:52 2016
@@ -31,7 +31,7 @@ public:
long operator()(long i, long j) const {return data_ + i + j;}
};
-void func(std::packaged_task<double(int, char)> p)
+void func(std::packaged_task<double(int, char)>)
{
}
Modified: libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp Fri Dec 23 17:37:52 2016
@@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int
{
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
}
+#else
+ ((void)p);
#endif
}
@@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int
{
assert(e.code() == make_error_code(std::future_errc::no_state));
}
+#else
+ ((void)p);
#endif
}
Modified: libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp Fri Dec 23 17:37:52 2016
@@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int
{
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
}
+#else
+ ((void)p);
#endif
}
@@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int
{
assert(e.code() == make_error_code(std::future_errc::no_state));
}
+#else
+ ((void)p);
#endif
}
Modified: libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp Fri Dec 23 17:37:52 2016
@@ -45,7 +45,7 @@ int test2 = 0;
int runs = 0;
-void f()
+void f(bool expect_result)
{
typedef std::chrono::system_clock Clock;
typedef std::chrono::milliseconds milliseconds;
@@ -54,7 +54,8 @@ void f()
test1 = 1;
cv.notify_one();
Clock::time_point t0 = Clock::now();
- bool r = cv.wait_for(lk, milliseconds(250), Pred(test2));
+ bool result = cv.wait_for(lk, milliseconds(250), Pred(test2));
+ assert(result == expect_result);
Clock::time_point t1 = Clock::now();
if (runs == 0)
{
@@ -73,7 +74,7 @@ int main()
{
{
L1 lk(m0);
- std::thread t(f);
+ std::thread t(f, /*expect_result*/true);
assert(test1 == 0);
while (test1 == 0)
cv.wait(lk);
@@ -87,7 +88,7 @@ int main()
test2 = 0;
{
L1 lk(m0);
- std::thread t(f);
+ std::thread t(f, /*expect_result*/false);
assert(test1 == 0);
while (test1 == 0)
cv.wait(lk);
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.lock/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.lock/types.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.lock/types.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.lock/types.pass.cpp Fri Dec 23 17:37:52 2016
@@ -28,7 +28,7 @@ int main()
typedef std::try_to_lock_t T2;
typedef std::adopt_lock_t T3;
- T1 t1 = std::defer_lock;
- T2 t2 = std::try_to_lock;
- T3 t3 = std::adopt_lock;
+ T1 t1 = std::defer_lock; ((void)t1);
+ T2 t2 = std::try_to_lock; ((void)t2);
+ T3 t3 = std::adopt_lock; ((void)t3);
}
Modified: libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp Fri Dec 23 17:37:52 2016
@@ -58,7 +58,6 @@ int main()
{
G g;
std::thread t0(g, 5, 5.5);
- std::thread::id id = t0.get_id();
std::thread t1;
t0 = std::move(t1);
assert(false);
Modified: libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp Fri Dec 23 17:37:52 2016
@@ -50,7 +50,8 @@ int main()
std::thread::id id0 = t0.get_id();
std::thread t1;
std::thread::id id1 = t1.get_id();
- assert(t0.get_id() != id1);
+ assert(t0.get_id() == id0);
+ assert(id0 != id1);
assert(t1.get_id() == std::thread::id());
t0.join();
}
Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp Fri Dec 23 17:37:52 2016
@@ -103,6 +103,8 @@ void checkThrows(any& a)
} catch (...) {
assert(false);
}
+#else
+ ((void)a);
#endif
}
Modified: libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp Fri Dec 23 17:37:52 2016
@@ -29,7 +29,7 @@ struct DummyUnaryFunction
struct BadUnaryFunction
{
template <typename S>
- constexpr int operator()(S const & s) const
+ constexpr int operator()(S const &) const
{
// Trigger a compile error if this function is instantiated.
// The constexpr is needed so that it is instantiated while checking
Modified: libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp Fri Dec 23 17:37:52 2016
@@ -56,8 +56,32 @@ constexpr decltype(std::placeholders::_9
constexpr decltype(std::placeholders::_10) cp10 = std::placeholders::_10;
#endif // TEST_STD_VER >= 11
+void use_placeholders_to_prevent_unused_warning() {
+ ((void)cp1);
+ ((void)cp2);
+ ((void)cp3);
+ ((void)cp4);
+ ((void)cp5);
+ ((void)cp6);
+ ((void)cp7);
+ ((void)cp8);
+ ((void)cp9);
+ ((void)cp10);
+ ((void)default1);
+ ((void)default2);
+ ((void)default3);
+ ((void)default4);
+ ((void)default5);
+ ((void)default6);
+ ((void)default7);
+ ((void)default8);
+ ((void)default9);
+ ((void)default10);
+}
+
int main()
{
+ use_placeholders_to_prevent_unused_warning();
test(std::placeholders::_1);
test(std::placeholders::_2);
test(std::placeholders::_3);
Modified: libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp Fri Dec 23 17:37:52 2016
@@ -138,26 +138,26 @@ inline constexpr CallType operator|(Call
struct ForwardingCallObject {
template <class ...Args>
- bool operator()(Args&&... args) & {
+ bool operator()(Args&&...) & {
set_call<Args&&...>(CT_NonConst | CT_LValue);
return true;
}
template <class ...Args>
- bool operator()(Args&&... args) const & {
+ bool operator()(Args&&...) const & {
set_call<Args&&...>(CT_Const | CT_LValue);
return true;
}
// Don't allow the call operator to be invoked as an rvalue.
template <class ...Args>
- bool operator()(Args&&... args) && {
+ bool operator()(Args&&...) && {
set_call<Args&&...>(CT_NonConst | CT_RValue);
return true;
}
template <class ...Args>
- bool operator()(Args&&... args) const && {
+ bool operator()(Args&&...) const && {
set_call<Args&&...>(CT_Const | CT_RValue);
return true;
}
@@ -526,7 +526,6 @@ void call_operator_forwarding_test()
assert(Fn::check_call<int&&>(CT_Const | CT_RValue));
}
{ // test multi arg
- int x = 42;
const double y = 3.14;
std::string s = "abc";
obj(42, std::move(y), s, std::string{"foo"});
Modified: libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp Fri Dec 23 17:37:52 2016
@@ -24,4 +24,5 @@ int main()
{
std::default_delete<int[]> d1;
std::default_delete<const int[]> d2 = d1;
+ ((void)d2);
}
Modified: libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp Fri Dec 23 17:37:52 2016
@@ -38,7 +38,7 @@ source1()
return std::unique_ptr<A[]>(new A[3]);
}
-void sink1(std::unique_ptr<A[]> p)
+void sink1(std::unique_ptr<A[]>)
{
}
@@ -48,7 +48,7 @@ source2()
return std::unique_ptr<A[], Deleter<A[]> >(new A[3]);
}
-void sink2(std::unique_ptr<A[], Deleter<A[]> > p)
+void sink2(std::unique_ptr<A[], Deleter<A[]> >)
{
}
@@ -59,7 +59,7 @@ source3()
return std::unique_ptr<A[], NCDeleter<A[]>&>(new A[3], d);
}
-void sink3(std::unique_ptr<A[], NCDeleter<A[]>&> p)
+void sink3(std::unique_ptr<A[], NCDeleter<A[]>&>)
{
}
Modified: libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp Fri Dec 23 17:37:52 2016
@@ -87,6 +87,7 @@ void test_implicit()
using T = ImplicitThrow;
optional<T> t = 42;
assert(false);
+ ((void)t);
} catch (int) {
}
}
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp Fri Dec 23 17:37:52 2016
@@ -91,6 +91,8 @@ int main() {
}
{
std::tuple<A&&> t(std::forward_as_tuple(A{}));
+ ((void)t);
std::tuple<ExplicitA&&> t2(std::forward_as_tuple(ExplicitA{}));
+ ((void)t2);
}
}
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp Fri Dec 23 17:37:52 2016
@@ -47,30 +47,30 @@ struct ExplicitDerived : std::tuple<T> {
int main() {
{
- std::tuple<Explicit> foo = Derived<int>{42};
+ std::tuple<Explicit> foo = Derived<int>{42}; ((void)foo);
assert(count == 1);
- std::tuple<Explicit> bar(Derived<int>{42});
+ std::tuple<Explicit> bar(Derived<int>{42}); ((void)bar);
assert(count == 2);
}
count = 0;
{
- std::tuple<Implicit> foo = Derived<int>{42};
+ std::tuple<Implicit> foo = Derived<int>{42}; ((void)foo);
assert(count == 1);
- std::tuple<Implicit> bar(Derived<int>{42});
+ std::tuple<Implicit> bar(Derived<int>{42}); ((void)bar);
assert(count == 2);
}
count = 0;
{
static_assert(!std::is_convertible<
ExplicitDerived<int>, std::tuple<Explicit>>::value, "");
- std::tuple<Explicit> bar(ExplicitDerived<int>{42});
+ std::tuple<Explicit> bar(ExplicitDerived<int>{42}); ((void)bar);
assert(count == 1);
}
count = 0;
{
// FIXME: Libc++ incorrectly rejects this code.
#ifndef _LIBCPP_VERSION
- std::tuple<Implicit> foo = ExplicitDerived<int>{42};
+ std::tuple<Implicit> foo = ExplicitDerived<int>{42}; ((void)foo);
static_assert(std::is_convertible<
ExplicitDerived<int>, std::tuple<Implicit>>::value,
"correct STLs accept this");
@@ -80,7 +80,7 @@ int main() {
"libc++ incorrectly rejects this");
#endif
assert(count == 0);
- std::tuple<Implicit> bar(ExplicitDerived<int>{42});
+ std::tuple<Implicit> bar(ExplicitDerived<int>{42}); ((void)bar);
assert(count == 1);
}
count = 0;
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp Fri Dec 23 17:37:52 2016
@@ -82,6 +82,7 @@ int main()
{
// check that the literal '0' can implicitly initialize a stored pointer.
std::tuple<int*> t = 0;
+ assert(std::get<0>(t) == nullptr);
}
{
std::tuple<int> t(2);
Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp Fri Dec 23 17:37:52 2016
@@ -29,7 +29,7 @@ struct ConstructsWithTupleLeaf
ConstructsWithTupleLeaf(ConstructsWithTupleLeaf &&) {}
template <class T>
- ConstructsWithTupleLeaf(T t) {
+ ConstructsWithTupleLeaf(T) {
static_assert(!std::is_same<T, T>::value,
"Constructor instantiated for type other than int");
}
Modified: libcxx/trunk/test/support/container_test_types.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/container_test_types.h?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/support/container_test_types.h (original)
+++ libcxx/trunk/test/support/container_test_types.h Fri Dec 23 17:37:52 2016
@@ -371,7 +371,7 @@ struct CopyInsertable {
template <class ...Args>
- CopyInsertable(Args&&... args) {
+ CopyInsertable(Args&&...) {
assert(false);
}
Modified: libcxx/trunk/test/support/controlled_allocators.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/controlled_allocators.hpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/support/controlled_allocators.hpp (original)
+++ libcxx/trunk/test/support/controlled_allocators.hpp Fri Dec 23 17:37:52 2016
@@ -117,7 +117,7 @@ struct AllocController {
}
template <class ...Args, class Alloc, class Tp>
- void countConstruct(Alloc const& a, Tp *p) {
+ void countConstruct(Alloc const&, Tp *p) {
++construct_called;
last_construct_pointer = p;
last_construct_alloc = &makeTypeID<Alloc>();
@@ -126,7 +126,7 @@ struct AllocController {
}
template <class Alloc, class Tp>
- void countDestroy(Alloc const& a, Tp *p) {
+ void countDestroy(Alloc const&, Tp *p) {
++destroy_called;
last_destroy_alloc = &makeTypeID<Alloc>();
last_destroy_type = &makeTypeID<Tp>();
@@ -263,7 +263,7 @@ public:
template <class U, class ...Args>
void construct(U *p, Args&&... args) {
- auto *c = ::new ((void*)p) U(std::forward<Args>(args)...);
+ ::new ((void*)p) U(std::forward<Args>(args)...);
P->countConstruct<Args&&...>(*this, p);
}
Modified: libcxx/trunk/test/support/filesystem_test_helper.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/filesystem_test_helper.hpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/support/filesystem_test_helper.hpp (original)
+++ libcxx/trunk/test/support/filesystem_test_helper.hpp Fri Dec 23 17:37:52 2016
@@ -230,6 +230,7 @@ private:
// check that the fs test root in the enviroment matches what we were
// compiled with.
static bool checked = checkDynamicTestRoot();
+ ((void)checked);
std::string cmd = LIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER;
cmd += " \"" + raw_cmd + "\"";
int ret = std::system(cmd.c_str());
Modified: libcxx/trunk/test/support/nasty_containers.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/nasty_containers.hpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/support/nasty_containers.hpp (original)
+++ libcxx/trunk/test/support/nasty_containers.hpp Fri Dec 23 17:37:52 2016
@@ -245,8 +245,8 @@ public:
iterator erase(const_iterator pos) { return l_.erase(pos); }
iterator erase(const_iterator pos, const_iterator last) { return l_.erase(pos, last); }
- void resize(size_type sz) { l_.resize(); }
- void resize(size_type sz, const value_type& c) { l_.resize(c); }
+ void resize(size_type) { l_.resize(); }
+ void resize(size_type, const value_type& c) { l_.resize(c); }
void swap(nasty_list &nl)
#if TEST_STD_VER > 14
Modified: libcxx/trunk/test/support/uses_alloc_types.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/uses_alloc_types.hpp?rev=290459&r1=290458&r2=290459&view=diff
==============================================================================
--- libcxx/trunk/test/support/uses_alloc_types.hpp (original)
+++ libcxx/trunk/test/support/uses_alloc_types.hpp Fri Dec 23 17:37:52 2016
@@ -281,7 +281,7 @@ public:
: Base(&makeArgumentID<UsesAllocatorV1 &&>()) {}
// Non-Uses Allocator Ctor
template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false>
- UsesAllocatorV1(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {}
+ UsesAllocatorV1(Args&&...) : Base(&makeArgumentID<Args&&...>()) {}
// Uses Allocator Arg Ctor
template <class ...Args>
@@ -290,10 +290,10 @@ public:
{ }
// BLOWS UP: Uses Allocator Last Ctor
- template <class _First, class ...Args, EnableIfB<sizeof...(Args) == Arity> _Dummy = false>
- constexpr UsesAllocatorV1(_First&& __first, Args&&... args)
+ template <class First, class ...Args, EnableIfB<sizeof...(Args) == Arity> Dummy = false>
+ constexpr UsesAllocatorV1(First&&, Args&&...)
{
- static_assert(!std::is_same<_First, _First>::value, "");
+ static_assert(!std::is_same<First, First>::value, "");
}
};
@@ -315,7 +315,7 @@ public:
// Non-Uses Allocator Ctor
template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false>
- UsesAllocatorV2(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {}
+ UsesAllocatorV2(Args&&...) : Base(&makeArgumentID<Args&&...>()) {}
// Uses Allocator Last Ctor
template <class ...Args, EnableIfB<sizeof...(Args) == Arity + 1> = false>
@@ -341,7 +341,7 @@ public:
// Non-Uses Allocator Ctor
template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false>
- UsesAllocatorV3(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {}
+ UsesAllocatorV3(Args&&...) : Base(&makeArgumentID<Args&&...>()) {}
// Uses Allocator Arg Ctor
template <class ...Args>
@@ -372,7 +372,7 @@ public:
: Base(&makeArgumentID<NotUsesAllocator &&>()) {}
// Non-Uses Allocator Ctor
template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false>
- NotUsesAllocator(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {}
+ NotUsesAllocator(Args&&...) : Base(&makeArgumentID<Args&&...>()) {}
// Uses Allocator Arg Ctor
template <class ...Args>
More information about the cfe-commits
mailing list