[all-commits] [llvm/llvm-project] f33274: [llvm-cxxfilt] Replace isalnum with isAlnum from S...

tmiasko via All-commits all-commits at lists.llvm.org
Fri Oct 1 23:57:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f33274c7bf44af652f1b52f1566552620f72ce1f
      https://github.com/llvm/llvm-project/commit/f33274c7bf44af652f1b52f1566552620f72ce1f
  Author: Tomasz Miąsko <tomasz.miasko at gmail.com>
  Date:   2021-10-02 (Sat, 02 Oct 2021)

  Changed paths:
    M llvm/test/tools/llvm-cxxfilt/delimiters.test
    M llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp

  Log Message:
  -----------
  [llvm-cxxfilt] Replace isalnum with isAlnum from StringExtras

D104366 introduced a new llvm-cxxfilt test with non-ASCII characters,
which caused a failure on llvm-clang-x86_64-expensive-checks-win
builder, with a stack trace suggesting issue in a call to isalnum.

The argument to isalnum should be either EOF or a value that is
representable in the type unsigned char. The llvm-cxxfilt does not
perform a cast from char to unsigned char before the call, so the
value might be out of valid range.

Replace the call to isalnum with isAlnum from StringExtras, which takes
a char as the argument. This also makes the check independent of the
current locale.

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




More information about the All-commits mailing list