[cfe-commits] r43980 - in /cfe/trunk: Sema/Sema.h Sema/SemaDecl.cpp include/clang/Parse/Action.h
Fariborz Jahanian
fjahanian at apple.com
Sat Nov 10 09:40:59 PST 2007
Author: fjahanian
Date: Sat Nov 10 11:40:57 2007
New Revision: 43980
URL: http://llvm.org/viewvc/llvm-project?rev=43980&view=rev
Log:
Minor code clean up in method def area.
Modified:
cfe/trunk/Sema/Sema.h
cfe/trunk/Sema/SemaDecl.cpp
cfe/trunk/include/clang/Parse/Action.h
Modified: cfe/trunk/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/Sema.h?rev=43980&r1=43979&r2=43980&view=diff
==============================================================================
--- cfe/trunk/Sema/Sema.h (original)
+++ cfe/trunk/Sema/Sema.h Sat Nov 10 11:40:57 2007
@@ -190,7 +190,7 @@
virtual DeclTy *FinalizeDeclaratorGroup(Scope *S, DeclTy *Group);
virtual DeclTy *ActOnStartOfFunctionDef(Scope *S, Declarator &D);
- virtual DeclTy *ObjcActOnStartOfMethodDef(Scope *S, DeclTy *D);
+ virtual void ObjcActOnStartOfMethodDef(Scope *S, DeclTy *D);
virtual DeclTy *ActOnFunctionDefBody(DeclTy *Decl, StmtTy *Body);
virtual void ActOnMethodDefBody(DeclTy *Decl, StmtTy *Body);
Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=43980&r1=43979&r2=43980&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Sat Nov 10 11:40:57 2007
@@ -1030,6 +1030,8 @@
// Verify and clean out per-function state.
+ // TODO: This code block is common with ActOnFunctionDefBody and need be
+ // refactored.
// Check goto/label use.
for (llvm::DenseMap<IdentifierInfo*, LabelStmt*>::iterator
I = LabelMap.begin(), E = LabelMap.end(); I != E; ++I) {
@@ -1053,7 +1055,7 @@
/// ObjcActOnStartOfMethodDef - This routine sets up parameters; invisible
/// and user declared, in the method definition's AST.
-Sema::DeclTy *Sema::ObjcActOnStartOfMethodDef(Scope *FnBodyScope, DeclTy *D) {
+void Sema::ObjcActOnStartOfMethodDef(Scope *FnBodyScope, DeclTy *D) {
assert(CurFunctionDecl == 0 && "Function parsing confused");
ObjcMethodDecl *MDecl = dyn_cast<ObjcMethodDecl>(static_cast<Decl *>(D));
@@ -1094,8 +1096,6 @@
}
FD->setParams(&Params[0], Params.size());
-
- return FD;
}
/// ImplicitlyDefineFunction - An undeclared identifier was used in a function
Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=43980&r1=43979&r2=43980&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sat Nov 10 11:40:57 2007
@@ -135,9 +135,8 @@
return ActOnDeclarator(FnBodyScope, D, 0);
}
- virtual DeclTy *ObjcActOnStartOfMethodDef(Scope *FnBodyScope, DeclTy *D) {
- // Default to ObjcActOnMethodDefinition.
- return ObjcActOnMethodDefinition(FnBodyScope, D, 0);
+ virtual void ObjcActOnStartOfMethodDef(Scope *FnBodyScope, DeclTy *D) {
+ return;
}
/// ActOnFunctionDefBody - This is called when a function body has completed
More information about the cfe-commits
mailing list