[PATCH] D45595: [libcxx] [test] Fix nodiscard warnings.
Stephan T. Lavavej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 15:16:33 PDT 2018
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
[libcxx] [test] Fix nodiscard warnings.
MSVC's STL has marked to_bytes/from_bytes as nodiscard.
https://reviews.llvm.org/D45595
Files:
test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
Index: test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
===================================================================
--- test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
+++ test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
@@ -33,15 +33,15 @@
Myconv myconv;
try
{
- myconv.to_bytes(L"\xDA83");
+ (void)myconv.to_bytes(L"\xDA83");
assert(false);
}
catch (const std::range_error&)
{
}
try
{
- myconv.from_bytes('\xA5');
+ (void)myconv.from_bytes('\xA5');
assert(false);
}
catch (const std::range_error&)
@@ -56,7 +56,7 @@
#ifndef TEST_HAS_NO_EXCEPTIONS
try
{
- myconv.from_bytes('\xA5');
+ (void)myconv.from_bytes('\xA5');
assert(false);
}
catch (const std::range_error&)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45595.142273.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180412/462a5902/attachment.bin>
More information about the cfe-commits
mailing list