[PATCH] D19625: [libc++] Void-cast runtime-unused variables.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 18:31:03 PDT 2016


EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.

One inline change requested.


================
Comment at: test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp:24421
@@ -24420,2 +24420,3 @@
     std::locale lc = std::locale::classic();
     std::locale lg(lc, new my_numpunct);
+    ((void)str); // Prevent unused warning
----------------
Isn't this unused as well on non-apple platforms?

================
Comment at: test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp:24422
@@ -24421,2 +24421,3 @@
     std::locale lg(lc, new my_numpunct);
+    ((void)str); // Prevent unused warning
 #ifdef __APPLE__
----------------
Move  `str` inside the `#ifdef __APPLE__` instead.

================
Comment at: test/std/numerics/rand/rand.device/eval.pass.cpp:33
@@ -32,3 +32,3 @@
     }
-    catch (const std::system_error& e)
+    catch (const std::system_error&)
     {
----------------
This looks OK, but I noticed that *technically* the spec only says the exception type is derived from `std::exception`.

However if we can keep testing this exception without bothering anybody I say we do.


http://reviews.llvm.org/D19625





More information about the cfe-commits mailing list