summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
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