diff options
author | John McCall <rjmccall@apple.com> | 2011-07-22 02:45:48 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-22 02:45:48 +0000 |
commit | 6c2c250db1e2d0138bbfaadbbec3118db7e8a8c9 (patch) | |
tree | a67ea5cf0a0af1a46b95c3b6166de4613a64b23a /lib/StaticAnalyzer/Core/CFRefCount.cpp | |
parent | db8264e4c5ffd7af6fbad4ca4306bd382bb02691 (diff) |
In Objective-C, pull arbitrary attributes from overridden
methods, including indirectly overridden methods like those
declared in protocols and categories. There are mismatches
that we would like to diagnose but aren't yet, but this
is fine for now.
I looked at approaches that avoided doing this lookup
unless we needed it, but the infer-related-result-type
checks were doing it anyway, so I left it with the same
fast-path check for no previous declartions of that
selector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index bf53029208..7eb65cef19 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -85,15 +85,6 @@ public: }; } -static const ObjCMethodDecl* -ResolveToInterfaceMethodDecl(const ObjCMethodDecl *MD) { - const ObjCInterfaceDecl *ID = MD->getClassInterface(); - - return MD->isInstanceMethod() - ? ID->lookupInstanceMethod(MD->getSelector()) - : ID->lookupClassMethod(MD->getSelector()); -} - namespace { class GenericNodeBuilderRefCount { StmtNodeBuilder *SNB; @@ -863,10 +854,6 @@ public: IdentifierInfo *ClsName = ID->getIdentifier(); QualType ResultTy = MD->getResultType(); - // Resolve the method decl last. - if (const ObjCMethodDecl *InterfaceMD = ResolveToInterfaceMethodDecl(MD)) - MD = InterfaceMD; - if (MD->isInstanceMethod()) return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy); else |