[test] Silence unused parameter/typedef warnings

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300575 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Casey Carter
2017-04-18 18:44:33 +00:00
parent 2f2efbd520
commit 6f448f6943
3 changed files with 2 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ int main()
std::throw_with_nested("String literal"); std::throw_with_nested("String literal");
assert(false); assert(false);
} }
catch (const char * s) catch (const char *)
{ {
} }
} }

View File

@@ -81,11 +81,9 @@ void test_sfinae() {
using DB = NCConvertingDeleter<B[]>; using DB = NCConvertingDeleter<B[]>;
using UA = std::unique_ptr<A[]>; using UA = std::unique_ptr<A[]>;
using UAC = std::unique_ptr<const A[]>; using UAC = std::unique_ptr<const A[]>;
using UB = std::unique_ptr<B[]>;
using UAD = std::unique_ptr<A[], DA>; using UAD = std::unique_ptr<A[], DA>;
using UACD = std::unique_ptr<const A[], DAC>; using UACD = std::unique_ptr<const A[], DAC>;
using UBD = std::unique_ptr<B[], DB>;
{ // cannot move from an lvalue { // cannot move from an lvalue
static_assert(std::is_assignable<UAC, UA&&>::value, ""); static_assert(std::is_assignable<UAC, UA&&>::value, "");
static_assert(!std::is_assignable<UAC, UA&>::value, ""); static_assert(!std::is_assignable<UAC, UA&>::value, "");

View File

@@ -46,7 +46,7 @@ struct NonDefaultDeleter {
template <class ElemType> template <class ElemType>
void test_sfinae() { void test_sfinae() {
#if TEST_STD_VER >= 11 #if TEST_STD_VER >= 11
{ // the constructor does not participate in overload resultion when { // the constructor does not participate in overload resolution when
// the deleter is a pointer type // the deleter is a pointer type
using U = std::unique_ptr<ElemType, void (*)(void*)>; using U = std::unique_ptr<ElemType, void (*)(void*)>;
static_assert(!std::is_default_constructible<U>::value, ""); static_assert(!std::is_default_constructible<U>::value, "");