diff options
Diffstat (limited to 'clang/Lex/PPExpressions.cpp')
-rw-r--r-- | clang/Lex/PPExpressions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Lex/PPExpressions.cpp b/clang/Lex/PPExpressions.cpp index 48ec52af8cb..2a18cfd6102 100644 --- a/clang/Lex/PPExpressions.cpp +++ b/clang/Lex/PPExpressions.cpp @@ -475,7 +475,7 @@ static bool EvaluateDirectiveSubExpr(llvm::APSInt &LHS, unsigned MinPrec, break; case tok::lessless: { // Determine whether overflow is about to happen. - unsigned ShAmt = RHS.getLimitedValue(); + unsigned ShAmt = static_cast<unsigned>(RHS.getLimitedValue()); if (ShAmt >= LHS.getBitWidth()) Overflow = true, ShAmt = LHS.getBitWidth()-1; else if (LHS.isUnsigned()) @@ -490,7 +490,7 @@ static bool EvaluateDirectiveSubExpr(llvm::APSInt &LHS, unsigned MinPrec, } case tok::greatergreater: { // Determine whether overflow is about to happen. - unsigned ShAmt = RHS.getLimitedValue(); + unsigned ShAmt = static_cast<unsigned>(RHS.getLimitedValue()); if (ShAmt >= LHS.getBitWidth()) Overflow = true, ShAmt = LHS.getBitWidth()-1; Res = LHS >> ShAmt; |