YAMLParser: silence warning about tautological comparison on unsigned-char platforms.

No functionality change.

llvm-svn: 155280
This commit is contained in:
Benjamin Kramer 2012-04-21 10:51:42 +00:00
parent 40edb2a0fb
commit 0aa0d3d633
1 changed files with 1 additions and 1 deletions

View File

@ -658,7 +658,7 @@ std::string yaml::escape(StringRef Input) {
EscapedInput += "\\r"; EscapedInput += "\\r";
else if (*i == 0x1B) else if (*i == 0x1B)
EscapedInput += "\\e"; EscapedInput += "\\e";
else if (*i >= 0 && *i < 0x20) { // Control characters not handled above. else if ((unsigned char)*i < 0x20) { // Control characters not handled above.
std::string HexStr = utohexstr(*i); std::string HexStr = utohexstr(*i);
EscapedInput += "\\x" + std::string(2 - HexStr.size(), '0') + HexStr; EscapedInput += "\\x" + std::string(2 - HexStr.size(), '0') + HexStr;
} else if (*i & 0x80) { // UTF-8 multiple code unit subsequence. } else if (*i & 0x80) { // UTF-8 multiple code unit subsequence.