]> granicus.if.org Git - clang/commitdiff
[Lex] Try to fix a 'comparison is always false' warning. NFC.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 16 Jun 2016 02:30:33 +0000 (02:30 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 16 Jun 2016 02:30:33 +0000 (02:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272867 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPDirectives.cpp

index 7c7c8f2a186d57d037de8784f5b55d31453d45ac..77f118fd3ccb7c5a38da327e611c253e95b49e86 100644 (file)
@@ -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')