diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 7c7c8f2a186d57d037de8784f5b55d31453d45ac..77f118fd3ccb7c5a38da327e611c253e95b49e86 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -162,7 +162,7 @@ static bool warnByDefaultOnWrongCase(StringRef Include) {
   SmallString<32> LowerInclude{Include};
   for (char &Ch : LowerInclude) {
     // In the ASCII range?
-    if (Ch < 0 || Ch > 0x7f)
+    if (static_cast<unsigned char>(Ch) > 0x7f)
       return false; // Can't be a standard header
     // ASCII lowercase:
     if (Ch >= 'A' && Ch <= 'Z')