[PATCH] D130282: [llvm][FileCheck] Fix unit tests failures with EXPENSIVE_CHECKS

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 08:50:26 PDT 2022


DavidSpickett added a reviewer: kazu.
DavidSpickett added a comment.

To give some context, this small example demos what I mean:

  #define _GLIBCXX_DEBUG
  #include <algorithm>
  #include <array>
  #include <stdio.h>
  
  int main()
  {
      std::array<int, 1> s = {5};
      std::sort(s.begin(), s.end(), [](int a, int b) {
          printf("comparator called!\n");
          return a < b;
      });
  }

On a couple of systems I have access to, that will print even though there's only 1 item.

There is a buildbot for EXPENSIVE_CHECKS but it is release mode and on Debian. So it's possible that changes if you hit this or not.

Anyway, hopefully the logic makes sense.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130282/new/

https://reviews.llvm.org/D130282



More information about the llvm-commits mailing list