[all-commits] [llvm/llvm-project] 297c83: [libc++] fix std::sort(T**, T**)

Brett Gutstein via All-commits all-commits at lists.llvm.org
Fri Dec 4 13:10:34 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 297c839e2d22f9bc37f5f8cca7eb5924b49716d2
      https://github.com/llvm/llvm-project/commit/297c839e2d22f9bc37f5f8cca7eb5924b49716d2
  Author: Brett Gutstein <brett.gutstein at cst.cam.ac.uk>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M libcxx/include/algorithm
    M libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp

  Log Message:
  -----------
  [libc++] fix std::sort(T**, T**)

previously, invocations of std::sort(T**, T**) casted the arguments to
(size_t *). this breaks sorting on systems for which pointers don't fit
in a size_t. change the cast to (uintptr_t *) and add a test.

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




More information about the All-commits mailing list