[all-commits] [llvm/llvm-project] 219511: [APINotes] Make an assert in a std::sort call tole...

Dmitri Gribenko via All-commits all-commits at lists.llvm.org
Thu Mar 28 15:14:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 219511aee21cc652e1ede0458de4a4a66f04c81c
      https://github.com/llvm/llvm-project/commit/219511aee21cc652e1ede0458de4a4a66f04c81c
  Author: Dmitri Gribenko <gribozavr at gmail.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M clang/lib/APINotes/APINotesWriter.cpp

  Log Message:
  -----------
  [APINotes] Make an assert in a std::sort call tolerate self-comparisons

libc++ debug mode verifies that a comparator passed to std::sort defines
a strict weak order by calling it with the same element.

See also:

- RFC that introduced the feature:
  https://discourse.llvm.org/t/rfc-strict-weak-ordering-checks-in-the-debug-libc/70217

- `strict_weak_ordering_check.h` in libc++ sources.



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