aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Parse/Parser.h4
-rw-r--r--lib/Parse/Parser.cpp12
-rw-r--r--lib/Sema/Sema.cpp2
-rw-r--r--lib/Sema/Sema.h7
4 files changed, 7 insertions, 18 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index a2729f0b8b..c95e3f1f0b 100644
--- a/include/clang/Parse/Parser.h
+++ b/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/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index a5e73cce32..330c22d1f4 100644
--- a/lib/Parse/Parser.cpp
+++ b/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/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index c8d83bd4a5..c2f73d2f80 100644
--- a/lib/Sema/Sema.cpp
+++ b/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<Expr*>(E);
}
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 321471d597..a088bd3879 100644
--- a/lib/Sema/Sema.h
+++ b/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<DeclTy*> &Decls);
+ virtual void ActOnDefs(Scope *S, SourceLocation DeclStart,
+ IdentifierInfo *ClassName,
+ llvm::SmallVectorImpl<DeclTy*> &Decls);
virtual DeclTy *ActOnField(Scope *S, SourceLocation DeclStart,
Declarator &D, ExprTy *BitfieldWidth);