aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-28 05:10:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-28 05:10:52 +0000
commita8530375168f578e9039837c58054d55655c981b (patch)
treede43c9445e8ecc33255913b2f7d6187c71804c8b /lib/AST/DeclObjC.cpp
parent782fa308a765aeac2acb39c4e697c937ec21185b (diff)
Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index e082a41551..503bc7052d 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -286,12 +286,10 @@ ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() {
return ID;
if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext()))
return CD->getClassInterface();
- if (ObjCImplementationDecl *IMD =
- dyn_cast<ObjCImplementationDecl>(getDeclContext()))
+ if (ObjCImplDecl *IMD = dyn_cast<ObjCImplDecl>(getDeclContext()))
return IMD->getClassInterface();
- if (ObjCCategoryImplDecl *CID =
- dyn_cast<ObjCCategoryImplDecl>(getDeclContext()))
- return CID->getClassInterface();
+
+ assert(!isa<ObjCProtocolDecl>(getDeclContext()) && "It's a protocol method");
assert(false && "unknown method context");
return 0;
}