[cfe-commits] r45008 - /cfe/trunk/Sema/SemaDecl.cpp

Steve Naroff snaroff at apple.com
Thu Dec 13 10:18:56 PST 2007


Author: snaroff
Date: Thu Dec 13 12:18:56 2007
New Revision: 45008

URL: http://llvm.org/viewvc/llvm-project?rev=45008&view=rev
Log:

Sema::ActOnFinishFunctionBody(): Since we no longer synthesize a FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment.

Modified:
    cfe/trunk/Sema/SemaDecl.cpp

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=45008&r1=45007&r2=45008&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Thu Dec 13 12:18:56 2007
@@ -1016,13 +1016,11 @@
   if (FunctionDecl *FD = dyn_cast<FunctionDecl>(dcl)) {
     FD->setBody((Stmt*)Body);
     assert(FD == CurFunctionDecl && "Function parsing confused");
+    CurFunctionDecl = 0;
   } else if (ObjcMethodDecl *MD = dyn_cast<ObjcMethodDecl>(dcl)) {
     MD->setBody((Stmt*)Body);
     CurMethodDecl = 0;
-  }
-  // This is unconditional, since methods have a corresponding function decl.
-  CurFunctionDecl = 0;
-  
+  }  
   // Verify and clean out per-function state.
   
   // Check goto/label use.





More information about the cfe-commits mailing list