[PATCH] D61365: [libcxx] [test] Suppress float->int narrowing warning in vector range-construction test.

Billy Robert O'Neal III via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 20:38:30 PDT 2019


BillyONeal marked an inline comment as done.
BillyONeal added inline comments.


================
Comment at: test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:159
     float array[3] = {0.0f, 1.0f, 2.0f};
+#pragma warning(suppress: 4244) // narrowing float to int
     std::vector<int> v(array, array + 3);
----------------
CaseyCarter wrote:
> This will blow up non-MSVC-ish when running the test suite with `-Wall -W -Werror` (which is typical). I suggest wrapping in `#ifdef _MSC_VER`.
Why didn't it blow up on Contest then? clang-cl is happy with it?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61365/new/

https://reviews.llvm.org/D61365





More information about the cfe-commits mailing list