[libcxx] [test] Fix nodiscard warnings.

MSVC's STL has marked to_bytes/from_bytes as nodiscard.

Fixes D45595.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2018-04-12 23:56:12 +00:00
parent 8a869d0f42
commit ebb3225ce5

View File

@@ -33,7 +33,7 @@ int main()
Myconv myconv;
try
{
myconv.to_bytes(L"\xDA83");
(void)myconv.to_bytes(L"\xDA83");
assert(false);
}
catch (const std::range_error&)
@@ -41,7 +41,7 @@ int main()
}
try
{
myconv.from_bytes('\xA5');
(void)myconv.from_bytes('\xA5');
assert(false);
}
catch (const std::range_error&)
@@ -56,7 +56,7 @@ int main()
#ifndef TEST_HAS_NO_EXCEPTIONS
try
{
myconv.from_bytes('\xA5');
(void)myconv.from_bytes('\xA5');
assert(false);
}
catch (const std::range_error&)