aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 78988e9..1f695b4 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -41,6 +41,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
+#include <limits>
#include <optional>
#include <string>
#include <tuple>
@@ -3456,7 +3457,7 @@ std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr,
}
unsigned Value = llvm::hexDigitValue(C);
- if (Value == -1U) {
+ if (Value == std::numeric_limits<unsigned>::max()) {
if (!Delimited)
break;
if (Diagnose)