[cfe-commits] r55216 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/Parser.cpp lib/Sema/Sema.cpp lib/Sema/Sema.h

Chris Lattner sabre at nondot.org
Fri Aug 22 19:00:52 PDT 2008


Author: lattner
Date: Fri Aug 22 21:00:52 2008
New Revision: 55216

URL: http://llvm.org/viewvc/llvm-project?rev=55216&view=rev
Log:
minor cleanup, remove finalize method.

Modified:
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/lib/Parse/Parser.cpp
    cfe/trunk/lib/Sema/Sema.cpp
    cfe/trunk/lib/Sema/Sema.h

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=55216&r1=55215&r2=55216&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Fri Aug 22 21:00:52 2008
@@ -85,10 +85,6 @@
   /// the EOF was encountered.
   bool ParseTopLevelDecl(DeclTy*& Result);
   
-  /// Finalize - Shut down the parser.
-  ///
-  void Finalize();
-  
 private:
   //===--------------------------------------------------------------------===//
   // Low-Level token peeking and consumption methods.

Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=55216&r1=55215&r2=55216&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Fri Aug 22 21:00:52 2008
@@ -281,13 +281,6 @@
   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 @@
   DeclTy *Res;
   while (!ParseTopLevelDecl(Res))
     /*parse them all*/;
-
-  Finalize();
+  
+  ExitScope();
+  assert(CurScope == 0 && "Scope imbalance!");
 }
 
 /// ParseExternalDeclaration:

Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=55216&r1=55215&r2=55216&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Fri Aug 22 21:00:52 2008
@@ -122,8 +122,6 @@
     Expr = new ImplicitCastExpr(Type, Expr);
 }
 
-
-
 void Sema::DeleteExpr(ExprTy *E) {
   delete static_cast<Expr*>(E);
 }

Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=55216&r1=55215&r2=55216&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Fri Aug 22 21:00:52 2008
@@ -136,7 +136,7 @@
   /// 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 @@
   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);
   





More information about the cfe-commits mailing list