diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:12:34 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:12:34 +0000 |
commit | fbfb2ab63e94f1b0c248cd810ae3fb35889d99b6 (patch) | |
tree | 67ea304c455aa91bacfbd7b4be06824ff157ce3c /libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp | |
parent | ad55ee58691b58f3ac36e688fc90808d5cf71e7f (diff) | |
download | bcm5719-llvm-fbfb2ab63e94f1b0c248cd810ae3fb35889d99b6.tar.gz bcm5719-llvm-fbfb2ab63e94f1b0c248cd810ae3fb35889d99b6.zip |
[libcxx] [test] D27021: Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12.
Add static_cast<std::size_t> when comparing distance() to size().
These replacements were performed programmatically with regex_replace():
const vector<pair<regex, string>> reg_fmt = {
{ regex(R"(assert\((\w+)\.size\(\) == std::distance\((\w+, \w+)\)\))"),
"assert($1.size() == static_cast<std::size_t>(std::distance($2)))" },
{ regex(R"(assert\(distance\((\w+\.begin\(\), \w+\.end\(\))\) == (\w+)\.size\(\)\))"),
"assert(static_cast<std::size_t>(distance($1)) == $2.size())" },
{ regex(R"(assert\(std::distance\((\w+\.\w*begin\(\), \w+\.\w*end\(\))\) == (\w+)\.size\(\)\))"),
"assert(static_cast<std::size_t>(std::distance($1)) == $2.size())" },
};
Also, include <cstddef> when it wasn't already being included.
llvm-svn: 288745
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp')
0 files changed, 0 insertions, 0 deletions