[all-commits] [llvm/llvm-project] 13eb29: Turn unreachable error into assert

RoboTux via All-commits all-commits at lists.llvm.org
Tue May 23 05:52:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13eb298d5c3c31550fee0c889d3fd3a265450e3d
      https://github.com/llvm/llvm-project/commit/13eb298d5c3c31550fee0c889d3fd3a265450e3d
  Author: Thomas Preud'homme <thomas.preudhomme at arm.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

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

  Log Message:
  -----------
  Turn unreachable error into assert

Function valueFromStringRepr() throws an error on missing 0x prefix when
parsing a number string into a value. However, getWildcardRegex() already
ensures that only text with the 0x prefix will match and be parsed,
making that error throwing code dead code. This commit turn the code
into an assert and remove the unit tests exercising that test
accordingly.

Reviewed By: jhenderson

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




More information about the All-commits mailing list