Silence VC++ warnings, patch by Hartmut Kaiser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41693 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Lex/PPExpressions.cpp b/Lex/PPExpressions.cpp
index 48ec52a..2a18cfd 100644
--- a/Lex/PPExpressions.cpp
+++ b/Lex/PPExpressions.cpp
@@ -475,7 +475,7 @@
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 @@
}
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;