[cfe-commits] r71909 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri May 15 16:19:35 PDT 2009
Author: fjahanian
Date: Fri May 15 18:19:35 2009
New Revision: 71909
URL: http://llvm.org/viewvc/llvm-project?rev=71909&view=rev
Log:
Removed superfluous code.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=71909&r1=71908&r2=71909&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Fri May 15 18:19:35 2009
@@ -85,17 +85,6 @@
static unsigned getFunctionOrMethodNumArgs(Decl *d) {
if (const FunctionType *FnTy = getFunctionType(d))
return cast<FunctionProtoType>(FnTy)->getNumArgs();
- else if (VarDecl *V = dyn_cast<VarDecl>(d)) {
- QualType Ty = V->getType();
- if (Ty->isBlockPointerType()) {
- const FunctionType *FT =
- Ty->getAsBlockPointerType()->getPointeeType()->getAsFunctionType();
- if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FT))
- return Proto->getNumArgs();
-
- }
- assert(false && "getFunctionOrMethodNumArgs - caused by block mishap");
- }
return cast<ObjCMethodDecl>(d)->param_size();
}
More information about the cfe-commits
mailing list