[libcxx] [test] Silence MSVC warning C4146.
authorStephan T. Lavavej <stl@exchange.microsoft.com>
Thu, 12 Apr 2018 23:56:14 +0000 (23:56 +0000)
committerStephan T. Lavavej <stl@exchange.microsoft.com>
Thu, 12 Apr 2018 23:56:14 +0000 (23:56 +0000)
This test code triggers the MSVC warning:

"unary minus operator applied to unsigned type, result still unsigned"

Although it would be possible to change the test code to avoid
this warning, I have chosen to simply silence it.

Fixes D45594.

llvm-svn: 329976

libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp

index fa0641f..693d81a 100644 (file)
 #include <iostream>
 #include "test_iterators.h"
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
+#endif
+
 typedef std::num_get<char, input_iterator<const char*> > F;
 
 class my_facet