]> granicus.if.org Git - clang/commitdiff
fix a bug where we would type 0ULL as unsigned instead of unsigned long long
authorChris Lattner <sabre@nondot.org>
Thu, 23 Aug 2007 21:58:08 +0000 (21:58 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 23 Aug 2007 21:58:08 +0000 (21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41340 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 6d5d8527191d0cb21505c381f57f3fc2c4bbc7d8..f6d00070c4aba1068e52620ff5170c50329c9189 100644 (file)
@@ -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)) {