[all-commits] [llvm/llvm-project] 257831: [libc++] Check correctly ref-qualified __is_callab...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Aug 5 08:23:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 257831582c759048ecce5c393993268b71a602e0
      https://github.com/llvm/llvm-project/commit/257831582c759048ecce5c393993268b71a602e0
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-08-05 (Mon, 05 Aug 2024)

  Changed paths:
    M libcxx/include/__algorithm/equal_range.h
    M libcxx/include/__algorithm/includes.h
    M libcxx/include/__algorithm/is_permutation.h
    M libcxx/include/__algorithm/lower_bound.h
    M libcxx/include/__algorithm/max_element.h
    M libcxx/include/__algorithm/min_element.h
    M libcxx/include/__algorithm/minmax.h
    M libcxx/include/__algorithm/minmax_element.h
    M libcxx/include/__algorithm/partial_sort_copy.h
    M libcxx/include/__algorithm/search.h
    M libcxx/include/__algorithm/search_n.h
    M libcxx/include/__algorithm/upper_bound.h
    M libcxx/src/regex.cpp
    A libcxx/test/libcxx/algorithms/callable-requirements-rvalue.compile.pass.cpp
    A libcxx/test/libcxx/algorithms/callable-requirements.verify.cpp
    R libcxx/test/libcxx/algorithms/callable.verify.cpp
    M libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
    M libcxx/test/libcxx/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search_pred.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp

  Log Message:
  -----------
  [libc++] Check correctly ref-qualified __is_callable in algorithms (#101553)

We were only checking that the comparator was rvalue callable,
when in reality the algorithms always call comparators as lvalues.
This patch also refactors the tests for callable requirements and
expands it to a few missing algorithms.

This is take 2 of #73451, which was reverted because it broke some
CI bots. The issue was that we checked __is_callable with arguments
in the wrong order inside std::upper_bound. This has now been fixed
and a test was added.

Fixes #69554



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list