[all-commits] [llvm/llvm-project] fb4f60: [RGT] Recode more unreachable assertions and tauto...

Paul T Robinson via All-commits all-commits at lists.llvm.org
Fri Mar 19 09:18:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb4f6057a637cabc687f7457d20a29da2c890ec0
      https://github.com/llvm/llvm-project/commit/fb4f6057a637cabc687f7457d20a29da2c890ec0
  Author: Paul Robinson <paul.robinson at sony.com>
  Date:   2021-03-19 (Fri, 19 Mar 2021)

  Changed paths:
    M llvm/unittests/ADT/BitVectorTest.cpp
    M llvm/unittests/ADT/ImmutableListTest.cpp
    M llvm/unittests/ADT/StringRefTest.cpp
    M llvm/unittests/IR/BasicBlockTest.cpp
    M llvm/unittests/Linker/LinkModulesTest.cpp

  Log Message:
  -----------
  [RGT] Recode more unreachable assertions and tautologies

Count iterations of zero-trip loops and assert the count is zero,
rather than asserting inside the loop.
Unreachable functions should use llvm_unreachable.
Remove tautological 'if' statements, even when they're following a
pattern of checks.

Found by the Rotten Green Tests project.




More information about the All-commits mailing list