[all-commits] [llvm/llvm-project] 3a35bc: [llvm][FileCheck] Fix unit tests failures with EXP...

David Spickett via All-commits all-commits at lists.llvm.org
Mon Jul 25 01:19:40 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a35bcef222844c20efa450cc1b47e96aa9be9b0
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M llvm/lib/FileCheck/FileCheck.cpp

  Log Message:
  [llvm][FileCheck] Fix unit tests failures with EXPENSIVE_CHECKS

EXPENSIVE_CHECKS enables _GLIBCXX_DEBUG, which makes std::sort
check that the compare function is implemented correctly.

To do this it calls it with the first item as both sides.
Which trips the assert here because we think they're
2 capture ranges that overlap, when it's just the same range twice.

Check up front for the two sides being the same item
(same address, not just ==).

Reviewed By: kazu

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

More information about the All-commits mailing list