r232999 - Refactor: Simplify boolean expresssions in lib/Lex
David Blaikie
dblaikie at gmail.com
Mon Mar 23 12:39:19 PDT 2015
Author: dblaikie
Date: Mon Mar 23 14:39:19 2015
New Revision: 232999
URL: http://llvm.org/viewvc/llvm-project?rev=232999&view=rev
Log:
Refactor: Simplify boolean expresssions in lib/Lex
Simplify boolean expressions using `true` and `false` with `clang-tidy`
Patch by Richard Thomson.
Differential Revision: http://reviews.llvm.org/D8531
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=232999&r1=232998&r2=232999&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/trunk/lib/Lex/LiteralSupport.cpp Mon Mar 23 14:39:19 2015
@@ -144,7 +144,7 @@ static unsigned ProcessCharEscape(const
int CharVal = llvm::hexDigitValue(ThisTokBuf[0]);
if (CharVal == -1) break;
// About to shift out a digit?
- Overflow |= (ResultChar & 0xF0000000) ? true : false;
+ Overflow |= ResultChar & 0xF0000000;
ResultChar <<= 4;
ResultChar |= CharVal;
}
More information about the cfe-commits
mailing list