diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-13 01:54:58 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-13 01:54:58 +0000 |
commit | 105a3061f737f4d72bf9cba258f5b2fd991d7162 (patch) | |
tree | cf4a54b963c21ffcf12c43225fccf8af0b2618e7 /llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | |
parent | c7772add119d3a48af1aed5cfeac25427abe6376 (diff) | |
download | bcm5719-llvm-105a3061f737f4d72bf9cba258f5b2fd991d7162.tar.gz bcm5719-llvm-105a3061f737f4d72bf9cba258f5b2fd991d7162.zip |
[libcxx] [test] Fix size_t-to-int truncation warnings in syserr.hash.
After r289363, these tests were triggering MSVC x64 warning C4267
"conversion from 'size_t' to 'int', possible loss of data" by taking 0, 2, and 10
as std::size_t, then constructing error_code(int, const error_category&) or
error_condition(int, const error_category&) from that (N4618 19.5.3.2
[syserr.errcode.constructors]/3, 19.5.4.2 [syserr.errcondition.constructors]/3).
The fix is simple: take these ints as int, pass them to the int-taking
constructor, and perform a value-preserving static_cast<std::size_t>
when comparing them to `std::size_t result`.
Fixes D27691.
llvm-svn: 289512
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp')
0 files changed, 0 insertions, 0 deletions