aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-30 05:41:14 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-30 05:41:14 +0000
commit70a6576c9c8d21ff2361574f4937a2e73bd57779 (patch)
tree4c634e3adee29a3413643ef0b8980c08b342944a /lib/Analysis/CFRefCount.cpp
parentec16cb9b5a481d62a73ad47fa59034ced4d62022 (diff)
retain/release checker: Resolve method decl in @interface after getting the
ObjCInterfaceDecl, not before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index f5d29fd73e..a12542eaaa 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -765,13 +765,14 @@ public:
/// the summary for the current method being analyzed.
RetainSummary *getMethodSummary(const ObjCMethodDecl *MD) {
// FIXME: Eventually this should be unneeded.
- MD = ResolveToInterfaceMethodDecl(MD, Ctx);
-
- Selector S = MD->getSelector();
const ObjCInterfaceDecl *ID = MD->getClassInterface();
+ Selector S = MD->getSelector();
IdentifierInfo *ClsName = ID->getIdentifier();
QualType ResultTy = MD->getResultType();
+ // Resolve the method decl last.
+ MD = ResolveToInterfaceMethodDecl(MD, Ctx);
+
if (MD->isInstanceMethod())
return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy);
else