[Lex] Try to fix a 'comparison is always false' warning. NFC.

llvm-svn: 272867
This commit is contained in:
George Burgess IV 2016-06-16 02:30:33 +00:00
parent 7bd4720e6b
commit 5d3bd93101

View 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')