[all-commits] [llvm/llvm-project] 5dfbcc: [libc++] [test] Fix nodiscard_extensions.pass.cpp ...

Quuxplusone via All-commits all-commits at lists.llvm.org
Thu Apr 22 09:18:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5dfbcc5ae953b786f493ce5e9d78a4b5c5e55229
      https://github.com/llvm/llvm-project/commit/5dfbcc5ae953b786f493ce5e9d78a4b5c5e55229
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-04-22 (Thu, 22 Apr 2021)

  Changed paths:
    M libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp

  Log Message:
  -----------
  [libc++] [test] Fix nodiscard_extensions.pass.cpp in _LIBCPP_DEBUG mode.

`std::clamp(2, 1, 3, std::greater<int>())` has UB because (1 > 3) is false.
Swap the operands to fix the _LIBCPP_ASSERT failure in this test.




More information about the All-commits mailing list