[llvm-commits] [llvm] r155280 - /llvm/trunk/lib/Support/YAMLParser.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Apr 21 03:51:42 PDT 2012
Author: d0k
Date: Sat Apr 21 05:51:42 2012
New Revision: 155280
URL: http://llvm.org/viewvc/llvm-project?rev=155280&view=rev
Log:
YAMLParser: silence warning about tautological comparison on unsigned-char platforms.
No functionality change.
Modified:
llvm/trunk/lib/Support/YAMLParser.cpp
Modified: llvm/trunk/lib/Support/YAMLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLParser.cpp?rev=155280&r1=155279&r2=155280&view=diff
==============================================================================
--- llvm/trunk/lib/Support/YAMLParser.cpp (original)
+++ llvm/trunk/lib/Support/YAMLParser.cpp Sat Apr 21 05:51:42 2012
@@ -658,7 +658,7 @@
EscapedInput += "\\r";
else if (*i == 0x1B)
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);
EscapedInput += "\\x" + std::string(2 - HexStr.size(), '0') + HexStr;
} else if (*i & 0x80) { // UTF-8 multiple code unit subsequence.
More information about the llvm-commits
mailing list