[all-commits] [llvm/llvm-project] 6b90f6: [libc++][test] Make some string tests MSVC-friendly

Casey Carter via All-commits all-commits at lists.llvm.org
Mon Jan 9 15:00:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b90f6745ac78933baf2d56b1f32c274a52c2ec0
      https://github.com/llvm/llvm-project/commit/6b90f6745ac78933baf2d56b1f32c274a52c2ec0
  Author: Casey Carter <Casey at Carter.net>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp
    M libcxx/test/std/strings/basic.string/string.ops/string_substr/substr_rvalue.pass.cpp

  Log Message:
  -----------
  [libc++][test] Make some string tests MSVC-friendly

* Using one-or-two letter names for globals is asking for shadowing warnings.
* MSVCSTL's container proxy allocations strike again
* MSVCSTL's `<string>` doesn't define `std::out_of_range`
* `basic_string::substr` takes two arguments of type `size_type`. Let's use that type instead of `size_t` and `ptrdiff_t` to avoid narrowing warnings.

Differential Revision: https://reviews.llvm.org/D141253




More information about the All-commits mailing list