[llvm] 0057756 - [Clang][NFC] Fix UnicodeData.txt parsing.
Corentin Jabot via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 09:49:03 PDT 2022
Author: Corentin Jabot
Date: 2022-10-25T18:48:38+02:00
New Revision: 0057756fd40c44e4aa00b08c63b0436d5441105d
URL: https://github.com/llvm/llvm-project/commit/0057756fd40c44e4aa00b08c63b0436d5441105d
DIFF: https://github.com/llvm/llvm-project/commit/0057756fd40c44e4aa00b08c63b0436d5441105d.diff
LOG: [Clang][NFC] Fix UnicodeData.txt parsing.
Fix the UnicodeNameToCodepoint tool misshandling
the case of a line containing a single semi-colon
(which does not happens in practice)
Added:
Modified:
llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp b/llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp
index 49b88341b5a60..d74f81e8ebd9f 100644
--- a/llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp
+++ b/llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp
@@ -43,7 +43,7 @@ loadDataFiles(const std::string &NamesFile, const std::string &AliasesFile) {
if (FirstSemiPos == std::string::npos)
continue;
auto SecondSemiPos = Line.find(';', FirstSemiPos + 1);
- if (FirstSemiPos == std::string::npos)
+ if (SecondSemiPos == std::string::npos)
continue;
unsigned long long CodePoint;
if (llvm::getAsUnsignedInteger(
More information about the llvm-commits
mailing list