Index: clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp =================================================================== --- clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp +++ clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp @@ -65,10 +65,6 @@ return isSubclass(D, "OSObject"); } -static bool isOSIteratorSubclass(const Decl *D) { - return isSubclass(D, "OSIterator"); -} - static bool hasRCAnnotation(const Decl *D, StringRef rcAnnotation) { for (const auto *Ann : D->specific_attrs()) { if (Ann->getAnnotation() == rcAnnotation) @@ -233,10 +229,6 @@ // All objects returned with functions starting with "get" are getters. if (II->getName().startswith("get")) { - - // ...except for iterators. - if (isOSIteratorSubclass(PD)) - return getOSSummaryCreateRule(FD); return getOSSummaryGetRule(FD); } else { return getOSSummaryCreateRule(FD);