forked from OSchip/llvm-project
[analyzer] Remove custom rule for OSIterator in RetainCountChecker
Differential Revision: https://reviews.llvm.org/D53628 llvm-svn: 345339
This commit is contained in:
parent
3c2ed8f338
commit
7cdccb1459
|
@ -69,10 +69,6 @@ static bool isOSObjectDynamicCast(StringRef S) {
|
||||||
return S == "safeMetaCast";
|
return S == "safeMetaCast";
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isOSIteratorSubclass(const Decl *D) {
|
|
||||||
return isSubclass(D, "OSIterator");
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool hasRCAnnotation(const Decl *D, StringRef rcAnnotation) {
|
static bool hasRCAnnotation(const Decl *D, StringRef rcAnnotation) {
|
||||||
for (const auto *Ann : D->specific_attrs<AnnotateAttr>()) {
|
for (const auto *Ann : D->specific_attrs<AnnotateAttr>()) {
|
||||||
if (Ann->getAnnotation() == rcAnnotation)
|
if (Ann->getAnnotation() == rcAnnotation)
|
||||||
|
@ -240,10 +236,6 @@ RetainSummaryManager::generateSummary(const FunctionDecl *FD,
|
||||||
|
|
||||||
// All objects returned with functions starting with "get" are getters.
|
// All objects returned with functions starting with "get" are getters.
|
||||||
if (II->getName().startswith("get")) {
|
if (II->getName().startswith("get")) {
|
||||||
|
|
||||||
// ...except for iterators.
|
|
||||||
if (isOSIteratorSubclass(PD))
|
|
||||||
return getOSSummaryCreateRule(FD);
|
|
||||||
return getOSSummaryGetRule(FD);
|
return getOSSummaryGetRule(FD);
|
||||||
} else {
|
} else {
|
||||||
return getOSSummaryCreateRule(FD);
|
return getOSSummaryCreateRule(FD);
|
||||||
|
|
Loading…
Reference in New Issue