From: George Burgess IV Date: Thu, 16 Jun 2016 02:30:33 +0000 (+0000) Subject: [Lex] Try to fix a 'comparison is always false' warning. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50c5f439016ff04f7575e8f6c0a3c4c49564d342;p=clang [Lex] Try to fix a 'comparison is always false' warning. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272867 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 7c7c8f2a18..77f118fd3c 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(Ch) > 0x7f) return false; // Can't be a standard header // ASCII lowercase: if (Ch >= 'A' && Ch <= 'Z')