[cfe-commits] r116460 - in /cfe/trunk: lib/Lex/LiteralSupport.cpp test/Lexer/ms-extensions.c

Chris Lattner sabre at nondot.org
Wed Oct 13 17:24:10 PDT 2010


Author: lattner
Date: Wed Oct 13 19:24:10 2010
New Revision: 116460

URL: http://llvm.org/viewvc/llvm-project?rev=116460&view=rev
Log:
allow I128 suffixes in msextensions mode just like i128 suffixes, patch
by Martin Vejnar!

Modified:
    cfe/trunk/lib/Lex/LiteralSupport.cpp
    cfe/trunk/test/Lexer/ms-extensions.c

Modified: cfe/trunk/lib/Lex/LiteralSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/LiteralSupport.cpp?rev=116460&r1=116459&r2=116460&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/trunk/lib/Lex/LiteralSupport.cpp Wed Oct 13 19:24:10 2010
@@ -431,6 +431,7 @@
       }
       continue;  // Success.
     case 'i':
+    case 'I':
       if (PP.getLangOptions().Microsoft) {
         if (isFPConstant || isLong || isLongLong) break;
 
@@ -467,7 +468,6 @@
         }
       }
       // fall through.
-    case 'I':
     case 'j':
     case 'J':
       if (isImaginary) break;   // Cannot be repeated.

Modified: cfe/trunk/test/Lexer/ms-extensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/ms-extensions.c?rev=116460&r1=116459&r2=116460&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/ms-extensions.c (original)
+++ cfe/trunk/test/Lexer/ms-extensions.c Wed Oct 13 19:24:10 2010
@@ -4,6 +4,7 @@
 __int16 x2 = 4i16;
 __int32 x3 = 5i32;
 __int64 x5 = 0x42i64;
+__int64 x6 = 0x42I64;
 __int64 x4 = 70000000i128;
 
 __int64 y = 0x42i64u;  // expected-error {{invalid suffix}}





More information about the cfe-commits mailing list