Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.
Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.
The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 053a323..8016854 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -40,7 +40,6 @@
class DeclContext;
class DeclSpec;
class NamedDecl;
- class ScopedDecl;
class Stmt;
class Expr;
class InitListExpr;
@@ -285,16 +284,16 @@
}
DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup,
bool IsFunctionDefinition);
- ScopedDecl* ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC,
- QualType R, ScopedDecl* LastDeclarator,
- Decl* PrevDecl, bool& InvalidDecl);
- ScopedDecl* ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC,
- QualType R, ScopedDecl* LastDeclarator,
+ NamedDecl* ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC,
+ QualType R, Decl* LastDeclarator,
+ Decl* PrevDecl, bool& InvalidDecl);
+ NamedDecl* ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC,
+ QualType R, Decl* LastDeclarator,
Decl* PrevDecl, bool& InvalidDecl);
- ScopedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
- QualType R, ScopedDecl *LastDeclarator,
- Decl* PrevDecl, bool IsFunctionDefinition,
- bool& InvalidDecl);
+ NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
+ QualType R, Decl *LastDeclarator,
+ Decl* PrevDecl, bool IsFunctionDefinition,
+ bool& InvalidDecl);
virtual DeclTy *ActOnParamDeclarator(Scope *S, Declarator &D);
virtual void ActOnParamDefaultArgument(DeclTy *param,
SourceLocation EqualLoc,
@@ -399,7 +398,7 @@
/// Subroutines of ActOnDeclarator().
TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D, QualType T,
- ScopedDecl *LastDecl);
+ Decl *LastDecl);
TypedefDecl *MergeTypeDefDecl(TypedefDecl *New, Decl *Old);
FunctionDecl *MergeFunctionDecl(FunctionDecl *New, Decl *Old,
bool &Redeclaration);
@@ -786,10 +785,10 @@
//@}
ObjCInterfaceDecl *getObjCInterfaceDecl(IdentifierInfo *Id);
- ScopedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
- Scope *S);
- ScopedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
+ NamedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
Scope *S);
+ NamedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
+ Scope *S);
// More parsing and symbol table subroutines.