summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2016-02-18 22:34:54 +0000
committerRichard Trieu <rtrieu@google.com>2016-02-18 22:34:54 +0000
commitcc3949d99af2b2ea2f31c1694eeef7cea0f484f0 (patch)
tree7b6a787cb2352bf0f9ced314eaff8aad71618459 /clang/lib/Lex/PPExpressions.cpp
parent7a08381403b54cd8998f3c922f18b65867e3c07c (diff)
downloadbcm5719-llvm-cc3949d99af2b2ea2f31c1694eeef7cea0f484f0.tar.gz
bcm5719-llvm-cc3949d99af2b2ea2f31c1694eeef7cea0f484f0.zip
Remove use of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261271
Diffstat (limited to 'clang/lib/Lex/PPExpressions.cpp')
-rw-r--r--clang/lib/Lex/PPExpressions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp
index 6603a17cbd4..058e2741d7a 100644
--- a/clang/lib/Lex/PPExpressions.cpp
+++ b/clang/lib/Lex/PPExpressions.cpp
@@ -650,8 +650,10 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
case tok::greatergreater: {
// Determine whether overflow is about to happen.
unsigned ShAmt = static_cast<unsigned>(RHS.Val.getLimitedValue());
- if (ShAmt >= LHS.getBitWidth())
- Overflow = true, ShAmt = LHS.getBitWidth()-1;
+ if (ShAmt >= LHS.getBitWidth()) {
+ Overflow = true;
+ ShAmt = LHS.getBitWidth()-1;
+ }
Res = LHS.Val >> ShAmt;
break;
}
OpenPOWER on IntegriCloud