[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
Wed May 1 00:01:48 PDT 2019


BillyONeal created this revision.
BillyONeal added reviewers: mclow.lists, EricWF, ldionne.
Herald added a subscriber: dexonsmith.

https://reviews.llvm.org/D61365

Files:
  test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp


Index: test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
===================================================================
--- test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
+++ test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
@@ -156,6 +156,7 @@
     // Make sure initialization is performed with each element value, not with
     // a memory blob.
     float array[3] = {0.0f, 1.0f, 2.0f};
+#pragma warning(suppress: 4244) // narrowing float to int
     std::vector<int> v(array, array + 3);
     assert(v[0] == 0);
     assert(v[1] == 1);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61365.197509.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190501/418a99ab/attachment.bin>


More information about the cfe-commits mailing list