diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-09 22:35:53 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-09 22:35:53 +0000 |
commit | aec187660111a64fa05069cfb37f78a6aac3037f (patch) | |
tree | 47bca5078ce6274997f76eabee9bd3b4223df86a /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | 2bc2f33ba2da2bafab0b1f4058c8888fb8b1976d (diff) | |
download | llvm-aec187660111a64fa05069cfb37f78a6aac3037f.zip llvm-aec187660111a64fa05069cfb37f78a6aac3037f.tar.gz llvm-aec187660111a64fa05069cfb37f78a6aac3037f.tar.bz2 |
[libcxx] [test] Fix string_view tests.
test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp
Passing -1 to size_t triggers signed/unsigned mismatch warnings because it's
a value-modifying conversion. Add static_cast<size_t> to soothe the compiler.
(This file refers to size_t unqualified.)
test/std/strings/string.view/string.view.ops/substr.pass.cpp
Add <algorithm> for std::min() and <stdexcept> for std::out_of_range.
N4618 21.4.2.4 [string.view.access]/1: "Requires: pos < size()."
/4: "[ Note: Unlike basic_string::operator[], basic_string_view::operator[](size())
has undefined behavior instead of returning charT(). -end note ]"
Fixes D27633.
llvm-svn: 289283
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions