[cfe-commits] r104373 - in /cfe/trunk: include/clang/Basic/TokenKinds.def lib/Basic/IdentifierTable.cpp

Chris Lattner sabre at nondot.org
Fri May 21 13:22:37 PDT 2010


Author: lattner
Date: Fri May 21 15:22:37 2010
New Revision: 104373

URL: http://llvm.org/viewvc/llvm-project?rev=104373&view=rev
Log:
don't make _Bool be a keyword in -fms-extensions mode, patch by
Steven Watanabe!


Modified:
    cfe/trunk/include/clang/Basic/TokenKinds.def
    cfe/trunk/lib/Basic/IdentifierTable.cpp

Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=104373&r1=104372&r2=104373&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Fri May 21 15:22:37 2010
@@ -220,7 +220,7 @@
 KEYWORD(void                        , KEYALL)
 KEYWORD(volatile                    , KEYALL)
 KEYWORD(while                       , KEYALL)
-KEYWORD(_Bool                       , KEYALL)
+KEYWORD(_Bool                       , KEYNOMS)
 KEYWORD(_Complex                    , KEYALL)
 KEYWORD(_Imaginary                  , KEYALL)
 KEYWORD(__func__                    , KEYALL)

Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=104373&r1=104372&r2=104373&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/lib/Basic/IdentifierTable.cpp Fri May 21 15:22:37 2010
@@ -70,7 +70,8 @@
     KEYGNU = 16,
     KEYMS = 32,
     BOOLSUPPORT = 64,
-    KEYALTIVEC = 128
+    KEYALTIVEC = 128,
+    KEYNOMS = 256
   };
 }
 
@@ -94,6 +95,7 @@
   else if (LangOpts.Microsoft && (Flags & KEYMS)) AddResult = 1;
   else if (LangOpts.Bool && (Flags & BOOLSUPPORT)) AddResult = 2;
   else if (LangOpts.AltiVec && (Flags & KEYALTIVEC)) AddResult = 2;
+  else if (!LangOpts.Microsoft && (Flags & KEYNOMS)) AddResult = 2;
 
   // Don't add this keyword if disabled in this language.
   if (AddResult == 0) return;





More information about the cfe-commits mailing list