[PATCH] D53628: [analyzer] Remove custom rule for OSIterator in RetainCountChecker

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 16:40:40 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345339: [analyzer] Remove custom rule for OSIterator in RetainCountChecker (authored by george.karpenkov, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D53628?vs=170796&id=171224#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53628

Files:
  cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp


Index: cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp
@@ -69,10 +69,6 @@
   return S == "safeMetaCast";
 }
 
-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<AnnotateAttr>()) {
     if (Ann->getAnnotation() == rcAnnotation)
@@ -240,10 +236,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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53628.171224.patch
Type: text/x-patch
Size: 979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181025/fca4b1fe/attachment.bin>


More information about the llvm-commits mailing list