summaryrefslogtreecommitdiff
path: root/lib/Lex/LiteralSupport.cpp
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
commitfde14cc8295b657e8a0eb41f24fde9c8d8bfce73 (patch)
tree8c3074e27954014500cc1d35216594e5cf3a5bd1 /lib/Lex/LiteralSupport.cpp
parentc0f04d6052f737ff8df3a241849839cc37f12ecc (diff)
downloadclang-fde14cc8295b657e8a0eb41f24fde9c8d8bfce73.tar.gz
Make Oveflow tracking more legible (CR feedback from Richard Smith on r232999)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r--lib/Lex/LiteralSupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp
index 4e2ba1ab3f..af3e27fd52 100644
--- a/lib/Lex/LiteralSupport.cpp
+++ b/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;
}