This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by BillyONeal on May 1 2019, 12:00 AM.

Details

Diff Detail

Event Timeline

BillyONeal created this revision.May 1 2019, 12:00 AM
CaseyCarter added inline comments.
test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
159

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.

BillyONeal marked an inline comment as done.May 6 2019, 8:37 PM
BillyONeal added inline comments.
test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
159

Why didn't it blow up on Contest then? clang-cl is happy with it?

CaseyCarter added inline comments.May 7 2019, 12:02 AM
test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
159

clang-cl is the "ish" in my "MSVC-ish" (MSVC and compilers emulating MSVC). GCC and clang-without--fms-compatibility when compiling with -Wall warn about unrecognized pragmas, just as does cl in default mode (https://godbolt.org/z/Chue0L).

EricWF accepted this revision.May 14 2019, 2:43 PM

This LGTM after correctly wrapping it as Casey mentionse.

This revision is now accepted and ready to land.May 14 2019, 2:43 PM
CaseyCarter added inline comments.Oct 8 2019, 6:28 PM
test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
159

Correction: Wrap with #ifdef TEST_COMPILER_C1XX instead of #ifdef _MSC_VER.

BillyONeal abandoned this revision.Jan 21 2020, 1:35 PM

It looks like someone already fixed this.