[PATCH] D45595: [libcxx] [test] Fix nodiscard warnings.

2018-04-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT closed this revision.
STL_MSFT added a comment.

Committed with a follow-up to use the requested macro.


https://reviews.llvm.org/D45595



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45595: [libcxx] [test] Fix nodiscard warnings.

2018-04-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

There's a macro for this in test_macros.h to make it easier to search for. 
please use that


https://reviews.llvm.org/D45595



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45595: [libcxx] [test] Fix nodiscard warnings.

2018-04-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
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&)


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&)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits