Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index ca15176..d3f373f 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -288,12 +288,6 @@
   virtual void ObjCActOnStartOfMethodDef(Scope *S, DeclTy *D);
   
   virtual DeclTy *ActOnFinishFunctionBody(DeclTy *Decl, StmtArg Body);
-  virtual DeclTy *ActOnLinkageSpec(SourceLocation Loc, SourceLocation LBrace,
-                                   SourceLocation RBrace, const char *Lang,
-                                   unsigned StrSize, 
-                                   DeclTy **Decls, unsigned NumDecls);
-  virtual DeclTy *ActOnLinkageSpec(SourceLocation Loc, const char *Lang,
-                                   unsigned StrSize, DeclTy *D);
   virtual DeclTy *ActOnFileScopeAsmDecl(SourceLocation Loc, ExprArg expr);
 
   /// Scope actions.
@@ -326,6 +320,7 @@
                            DeclTy **Fields, unsigned NumFields,
                            SourceLocation LBrac, SourceLocation RBrac,
                            AttributeList *AttrList);
+  virtual void ActOnEnumStartDefinition(Scope *S, DeclTy *EnumDecl);
   virtual DeclTy *ActOnEnumConstant(Scope *S, DeclTy *EnumDecl,
                                     DeclTy *LastEnumConstant,
                                     SourceLocation IdLoc, IdentifierInfo *Id,
@@ -980,6 +975,20 @@
                                                  SourceLocation RParenLoc);
 
   //===--------------------------------------------------------------------===//
+  // C++ Declarations
+  //
+  virtual DeclTy *ActOnStartLinkageSpecification(Scope *S,
+                                                 SourceLocation ExternLoc,
+                                                 SourceLocation LangLoc,
+                                                 const char *Lang,
+                                                 unsigned StrSize,
+                                                 SourceLocation LBraceLoc);
+  virtual DeclTy *ActOnFinishLinkageSpecification(Scope *S,
+                                                  DeclTy *LinkageSpec,
+                                                  SourceLocation RBraceLoc);
+
+
+  //===--------------------------------------------------------------------===//
   // C++ Classes
   //
   virtual bool isCurrentClassName(const IdentifierInfo &II, Scope *S,