]> granicus.if.org Git - clang/commitdiff
Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there...
authorSteve Naroff <snaroff@apple.com>
Tue, 18 Dec 2007 00:16:02 +0000 (00:16 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 18 Dec 2007 00:16:02 +0000 (00:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45135 91177308-0d34-0410-b5e6-96231b3b80d8

Parse/ParseDecl.cpp
include/clang/Basic/TokenKinds.def

index d9ec4ddcf6db37d9a5e9309cedda5ddf8ca610fb..bed3d966a60c417831ce6ed9a75ec0c2312e64de 100644 (file)
@@ -441,6 +441,10 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
         Diag(Tok, diag::ext_thread_before, "extern");
       isInvalid = DS.SetStorageClassSpec(DeclSpec::SCS_extern, Loc, PrevSpec);
       break;
+    case tok::kw___private_extern__:
+         // FIXME: Implement private extern.
+      isInvalid = DS.SetStorageClassSpec(DeclSpec::SCS_extern, Loc, PrevSpec);
+      break;
     case tok::kw_static:
       if (DS.isThreadSpecified())
         Diag(Tok, diag::ext_thread_before, "static");
@@ -917,6 +921,7 @@ bool Parser::isDeclarationSpecifier() const {
     // storage-class-specifier
   case tok::kw_typedef:
   case tok::kw_extern:
+  case tok::kw___private_extern__:
   case tok::kw_static:
   case tok::kw_auto:
   case tok::kw_register:
index ca9beea886246f32305152cba2c98a25b76b62bc..a3485f4fb8898b2e24f3f81dd7411171e96a30ad 100644 (file)
@@ -298,6 +298,9 @@ KEYWORD(__label__                   , EXTC90|EXTC99|EXTCPP|EXTCPP0x)
 KEYWORD(__real                      , EXTC90|EXTC99|EXTCPP|EXTCPP0x)
 KEYWORD(__thread                    , EXTC90|EXTC99|EXTCPP|EXTCPP0x)
 
+// Apple Extension.
+KEYWORD(__private_extern__          , EXTC90|EXTC99|NOTCPP)
+
 // Alternate spelling for various tokens.  There are GCC extensions in all
 // languages, but should not be disabled in strict conformance mode.
 ALIAS("__attribute__", __attribute)