summaryrefslogtreecommitdiffstats
path: root/clang/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Sema')
-rw-r--r--clang/Sema/SemaExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp
index 6d5d8527191..f6d00070c4a 100644
--- a/clang/Sema/SemaExpr.cpp
+++ b/clang/Sema/SemaExpr.cpp
@@ -162,7 +162,8 @@ Action::ExprResult Sema::ParseNumericConstant(const Token &Tok) {
bool AllowUnsigned = Literal.isUnsigned || Literal.getRadix() != 10;
// Check from smallest to largest, picking the smallest type we can.
- if (!Literal.isLong) { // Are int/unsigned possibilities?
+ if (!Literal.isLong && !Literal.isLongLong) {
+ // Are int/unsigned possibilities?
unsigned IntSize = Context.getTypeSize(Context.IntTy,Tok.getLocation());
// Does it fit in a unsigned int?
if (ResultVal.isIntN(IntSize)) {
OpenPOWER on IntegriCloud