summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-23 19:54:44 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-23 19:54:44 +0000
commit96cedb52b384697148a0fb291051a32cac3b82af (patch)
treedfb66b9fe0c4e9a3ecdc7db31a67657007b93698
parent9965c5ae14f1123c3529d972bf7637407ffefcd3 (diff)
downloadbcm5719-llvm-96cedb52b384697148a0fb291051a32cac3b82af.tar.gz
bcm5719-llvm-96cedb52b384697148a0fb291051a32cac3b82af.zip
Make Oveflow tracking more legible (CR feedback from Richard Smith on r232999)
llvm-svn: 233006
-rw-r--r--clang/lib/Lex/LiteralSupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp
index 4e2ba1ab3f2..af3e27fd521 100644
--- a/clang/lib/Lex/LiteralSupport.cpp
+++ b/clang/lib/Lex/LiteralSupport.cpp
@@ -144,7 +144,8 @@ static unsigned ProcessCharEscape(const char *ThisTokBegin,
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;
}
OpenPOWER on IntegriCloud