]> granicus.if.org Git - clang/commitdiff
allow I128 suffixes in msextensions mode just like i128 suffixes, patch
authorChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2010 00:24:10 +0000 (00:24 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2010 00:24:10 +0000 (00:24 +0000)
by Martin Vejnar!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116460 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/LiteralSupport.cpp
test/Lexer/ms-extensions.c

index 3b739b3d0b58f4a17905098f1891aaa2bd90882e..2eabd7edcdef6a9419e5b24cb4da852c24fa0b88 100644 (file)
@@ -431,6 +431,7 @@ NumericLiteralParser(const char *begin, const char *end,
       }
       continue;  // Success.
     case 'i':
+    case 'I':
       if (PP.getLangOptions().Microsoft) {
         if (isFPConstant || isLong || isLongLong) break;
 
@@ -467,7 +468,6 @@ NumericLiteralParser(const char *begin, const char *end,
         }
       }
       // fall through.
-    case 'I':
     case 'j':
     case 'J':
       if (isImaginary) break;   // Cannot be repeated.
index 8b7d2e1efc0c3b3d8064277788ba8d0d05d135e2..9cd868e8f3f2eb5c32e58e42e14649df32c85322 100644 (file)
@@ -4,6 +4,7 @@ __int8 x1  = 3i8;
 __int16 x2 = 4i16;
 __int32 x3 = 5i32;
 __int64 x5 = 0x42i64;
+__int64 x6 = 0x42I64;
 __int64 x4 = 70000000i128;
 
 __int64 y = 0x42i64u;  // expected-error {{invalid suffix}}