]> granicus.if.org Git - clang/commitdiff
minor cleanup, remove finalize method.
authorChris Lattner <sabre@nondot.org>
Sat, 23 Aug 2008 02:00:52 +0000 (02:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 23 Aug 2008 02:00:52 +0000 (02:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Parser.h
lib/Parse/Parser.cpp
lib/Sema/Sema.cpp
lib/Sema/Sema.h

index a2729f0b8b59be5788a92295fa36dc9a7b5c54d9..c95e3f1f0b742e7057ab9e6743b0b4aebf883116 100644 (file)
@@ -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.
index a5e73cce32695d996e231e65873e212833d389fc..330c22d1f47196463c84b117a953e9564f33d4a2 100644 (file)
@@ -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:
index c8d83bd4a50d89e49559b015d012eb923b39773e..c2f73d2f80976505addf81ae1c62a8ffc05bc556 100644 (file)
@@ -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);
 }
index 321471d5979d278b7b079e611134dc8cb79d91d3..a088bd3879a9a496e0c702afbc3ad553509577e3 100644 (file)
@@ -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);