[libcxx] [test] Fix nodiscard warnings.

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

Fixes D45595.

llvm-svn: 329975
This commit is contained in:
Stephan T. Lavavej 2018-04-12 23:56:12 +00:00
parent 3ed719bb63
commit cf017f0451
1 changed files with 3 additions and 3 deletions

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&)