[all-commits] [llvm/llvm-project] 3666dd: [libc++] [test] Change a lot of free begin/end pai...

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Oct 6 13:43:58 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3666dd795d9e2114e49bd58ace042b663d6f8a3a
      https://github.com/llvm/llvm-project/commit/3666dd795d9e2114e49bd58ace042b663d6f8a3a
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-10-06 (Wed, 06 Oct 2021)

  Changed paths:
    M libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
    M libcxx/test/std/ranges/range.access/range.prim/data.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/types.h
    M libcxx/test/std/ranges/range.adaptors/range.drop/types.h
    M libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
    M libcxx/test/std/ranges/range.adaptors/range.reverse/types.h
    M libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/types.h
    M libcxx/test/std/ranges/range.adaptors/range.transform/types.h

  Log Message:
  -----------
  [libc++] [test] Change a lot of free begin/end pairs to members. NFCI.

If you have a `begin() const` member, you don't need a `begin()` member
unless you want it to do something different (e.g. have a different return
type). So in general, //view// types don't need `begin()` non-const members.

Also, static_assert some things about the types in "types.h", so that we
don't accidentally break those properties under refactoring.

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


  Commit: 610ac8dbcc16e85fe4b357f5d31919873a51ad27
      https://github.com/llvm/llvm-project/commit/610ac8dbcc16e85fe4b357f5d31919873a51ad27
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-10-06 (Wed, 06 Oct 2021)

  Changed paths:
    M libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.common.view/types.h
    M libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.drop/types.h
    M libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.take/types.h
    M libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.transform/types.h

  Log Message:
  -----------
  [libc++] [test] s/ContiguousView/MoveOnlyView/g. NFCI.

The unique (ha!) thing about this range type is that it's move-only.
Its contiguity is unsurprising (most of our test ranges are contiguous).
Discussed in D111231 but committed separately for clarity.


Compare: https://github.com/llvm/llvm-project/compare/6522b7cc3240...610ac8dbcc16


More information about the All-commits mailing list