diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index a2729f0b8b59..c95e3f1f0b74 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -85,10 +85,6 @@ public: /// the EOF was encountered. bool ParseTopLevelDecl(DeclTy*& Result); - /// Finalize - Shut down the parser. - /// - void Finalize(); - private: //===--------------------------------------------------------------------===// // Low-Level token peeking and consumption methods. diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index a5e73cce3269..330c22d1f471 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -281,13 +281,6 @@ bool Parser::ParseTopLevelDecl(DeclTy*& Result) { return false; } -/// Finalize - Shut down the parser. -/// -void Parser::Finalize() { - ExitScope(); - assert(CurScope == 0 && "Scope imbalance!"); -} - /// ParseTranslationUnit: /// translation-unit: [C99 6.9] /// external-declaration @@ -298,8 +291,9 @@ void Parser::ParseTranslationUnit() { DeclTy *Res; while (!ParseTopLevelDecl(Res)) /*parse them all*/; - - Finalize(); + + ExitScope(); + assert(CurScope == 0 && "Scope imbalance!"); } /// ParseExternalDeclaration: diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index c8d83bd4a50d..c2f73d2f8097 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -122,8 +122,6 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Type) { Expr = new ImplicitCastExpr(Type, Expr); } - - void Sema::DeleteExpr(ExprTy *E) { delete static_cast(E); } diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 321471d5979d..a088bd3879a9 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -136,7 +136,7 @@ public: /// of known functions used by the semantic analysis to do various /// kinds of checking (e.g. checking format string errors in printf calls). /// This list is populated upon the creation of a Sema object. - IdentifierInfo* KnownFunctionIDs[ id_num_known_functions ]; + IdentifierInfo* KnownFunctionIDs[id_num_known_functions]; /// SuperID - Identifier for "super" used for Objective-C checking. IdentifierInfo* SuperID; @@ -243,8 +243,9 @@ private: virtual DeclTy *ActOnTag(Scope *S, unsigned TagType, TagKind TK, SourceLocation KWLoc, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr); - virtual void ActOnDefs(Scope *S, SourceLocation DeclStart, IdentifierInfo - *ClassName, llvm::SmallVectorImpl &Decls); + virtual void ActOnDefs(Scope *S, SourceLocation DeclStart, + IdentifierInfo *ClassName, + llvm::SmallVectorImpl &Decls); virtual DeclTy *ActOnField(Scope *S, SourceLocation DeclStart, Declarator &D, ExprTy *BitfieldWidth);