r233006 - Make Oveflow tracking more legible (CR feedback from Richard Smith on r232999)
David Blaikie
dblaikie at gmail.com
Mon Mar 23 12:54:44 PDT 2015
Author: dblaikie
Date: Mon Mar 23 14:54:44 2015
New Revision: 233006
URL: http://llvm.org/viewvc/llvm-project?rev=233006&view=rev
Log:
Make Oveflow tracking more legible (CR feedback from Richard Smith on r232999)
Modified:
cfe/trunk/lib/Lex/LiteralSupport.cpp
Modified: cfe/trunk/lib/Lex/LiteralSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/LiteralSupport.cpp?rev=233006&r1=233005&r2=233006&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/trunk/lib/Lex/LiteralSupport.cpp Mon Mar 23 14:54:44 2015
@@ -144,7 +144,8 @@ static unsigned ProcessCharEscape(const
int CharVal = llvm::hexDigitValue(ThisTokBuf[0]);
if (CharVal == -1) break;
// About to shift out a digit?
- Overflow |= ResultChar & 0xF0000000;
+ if (ResultChar & 0xF0000000)
+ Overflow = true;
ResultChar <<= 4;
ResultChar |= CharVal;
}
More information about the cfe-commits
mailing list