[all-commits] [llvm/llvm-project] 5ccff5: ADT: Fix pointer comparison UB in SmallVector

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Mon Jan 11 15:31:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ccff5aaa68ab789834c4463ce05b05e57593b34
      https://github.com/llvm/llvm-project/commit/5ccff5aaa68ab789834c4463ce05b05e57593b34
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-01-11 (Mon, 11 Jan 2021)

  Changed paths:
    M llvm/include/llvm/ADT/SmallVector.h

  Log Message:
  -----------
  ADT: Fix pointer comparison UB in SmallVector

The standard requires comparisons of pointers to unrelated storage to
use `std::less`. Split out some helpers that do that and update all the
code that was comparing using `<` and friends (mostly assertions).

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




More information about the All-commits mailing list