summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitb2a143fad689f9d1258d252e861431582afe6d3c (patch)
tree3863b8c9cfb30564c0cd1bc2f8a7013180f2191d /clang/lib
parentdb3a57ec5cbf25797b087c074b1aa7c2aab6d3a0 (diff)
downloadbcm5719-llvm-b2a143fad689f9d1258d252e861431582afe6d3c.tar.gz
bcm5719-llvm-b2a143fad689f9d1258d252e861431582afe6d3c.zip
retain/release checker: Resolve method decl in @interface after getting the
ObjCInterfaceDecl, not before. llvm-svn: 70473
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index f5d29fd73e3..a12542eaaa4 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud