aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-05-15 23:19:35 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-05-15 23:19:35 +0000
commitc13b7ca5f5c81d0a526bda179d3cd700882e713e (patch)
tree697e7f3cefa5297c89cfb2f5793423f2936994c9
parent620d89ca4eb5dcb6be13a42aafa4849eaa9b834b (diff)
Removed superfluous code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71909 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaDeclAttr.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 5154c66c6c..1c2d37322c 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -85,17 +85,6 @@ static bool hasFunctionProto(Decl *d) {
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();
}