diff options
author | Steve Naroff <snaroff@apple.com> | 2007-12-13 18:18:56 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-12-13 18:18:56 +0000 |
commit | 4d83220c8f32dda189b66096ca6ddca149fda690 (patch) | |
tree | e8c889a34298c195591423754b1765d2ee4e1a58 | |
parent | db9c22917e411c924dae593d71e64fd616fd3a12 (diff) |
Sema::ActOnFinishFunctionBody(): Since we no longer synthesize a FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45008 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Sema/SemaDecl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index b0c86f5c50..c3b6a8c4d2 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -1016,13 +1016,11 @@ Sema::DeclTy *Sema::ActOnFinishFunctionBody(DeclTy *D, StmtTy *Body) { 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. |