aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-10-02 07:58:54 +0200
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-10-02 08:54:04 +0200
commitf33274c7bf44af652f1b52f1566552620f72ce1f (patch)
treeccbe934c6480dcd27068575cb58763d9925b9957 /llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
parentf41a9cf859a1032d604dd4d02887432441e7966f (diff)
downloadllvm-f33274c7bf44af652f1b52f1566552620f72ce1f.zip
llvm-f33274c7bf44af652f1b52f1566552620f72ce1f.tar.gz
llvm-f33274c7bf44af652f1b52f1566552620f72ce1f.tar.bz2
[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
Diffstat (limited to 'llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp')
-rw-r--r--llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp b/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
index d8bf8db..0a6d4b5 100644
--- a/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
+++ b/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
@@ -128,7 +128,7 @@ static void SplitStringDelims(
static bool IsLegalItaniumChar(char C) {
// Itanium CXX ABI [External Names]p5.1.1:
// '$' and '.' in mangled names are reserved for private implementations.
- return isalnum(C) || C == '.' || C == '$' || C == '_';
+ return isAlnum(C) || C == '.' || C == '$' || C == '_';
}
// If 'Split' is true, then 'Mangled' is broken into individual words and each