]> granicus.if.org Git - clang/commitdiff
Implement "private extern" on function decls!
authorSteve Naroff <snaroff@apple.com>
Mon, 28 Jan 2008 21:57:15 +0000 (21:57 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 28 Jan 2008 21:57:15 +0000 (21:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46464 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp
include/clang/AST/Decl.h

index 8719ad7992bbc67840adbedff11d2c7044669c23..7c089ee37b45ec51690cff758e5c6bad30d82065 100644 (file)
@@ -678,6 +678,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
       case DeclSpec::SCS_unspecified: SC = FunctionDecl::None; break;
       case DeclSpec::SCS_extern:      SC = FunctionDecl::Extern; break;
       case DeclSpec::SCS_static:      SC = FunctionDecl::Static; break;
+      case DeclSpec::SCS_private_extern: SC = FunctionDecl::PrivateExtern;break;
     }
 
     FunctionDecl *NewFD = new FunctionDecl(D.getIdentifierLoc(), II, R, SC,
index 9e78de3d2ee33d0fddc1714c4bf26d1f3ec2c7aa..cc96b0732dffd736b97d18bd9680f09cdb622566 100644 (file)
@@ -425,7 +425,7 @@ protected:
 class FunctionDecl : public ValueDecl {
 public:
   enum StorageClass {
-    None, Extern, Static
+    None, Extern, Static, PrivateExtern
   };
   FunctionDecl(SourceLocation L, IdentifierInfo *Id, QualType T,
                StorageClass S = None, bool isInline = false,