r350860 - [analyzer] [RetainCountChecker] Remove obsolete "MakeCollectable" enum value

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 10 10:14:25 PST 2019


Author: george.karpenkov
Date: Thu Jan 10 10:14:25 2019
New Revision: 350860

URL: http://llvm.org/viewvc/llvm-project?rev=350860&view=rev
Log:
[analyzer] [RetainCountChecker] Remove obsolete "MakeCollectable" enum value

Differential Revision: https://reviews.llvm.org/D56071

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h
    cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h?rev=350860&r1=350859&r2=350860&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h Thu Jan 10 10:14:25 2019
@@ -76,10 +76,6 @@ enum ArgEffectKind {
   /// if CFRetain has been called on the argument.
   IncRef,
 
-  /// The argument acts as if has been passed to CFMakeCollectable, which
-  /// transfers the object to the Garbage Collector under GC.
-  MakeCollectable,
-
   /// The argument is a pointer to a retain-counted object; on exit, the new
   /// value of the pointer is a +0 value or NULL.
   UnretainedOutParameter,

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp?rev=350860&r1=350859&r2=350860&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp Thu Jan 10 10:14:25 2019
@@ -730,8 +730,6 @@ ProgramStateRef RetainCountChecker::upda
       break;
     }
   }
-  if (AE.getKind() == MakeCollectable)
-    AE = AE.withKind(DoNothing);
 
   // Handle all use-after-releases.
   if (V.getKind() == RefVal::Released) {
@@ -741,9 +739,6 @@ ProgramStateRef RetainCountChecker::upda
   }
 
   switch (AE.getKind()) {
-    case MakeCollectable:
-      llvm_unreachable("MakeCollectable already converted");
-
     case UnretainedOutParameter:
     case RetainedOutParameter:
       llvm_unreachable("Applies to pointer-to-pointer parameters, which should "

Modified: cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp?rev=350860&r1=350859&r2=350860&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp Thu Jan 10 10:14:25 2019
@@ -457,7 +457,6 @@ static ArgEffect getStopTrackingHardEqui
   case Autorelease:
   case DecRefBridgedTransferred:
   case IncRef:
-  case MakeCollectable:
   case UnretainedOutParameter:
   case RetainedOutParameter:
   case MayEscape:
@@ -665,7 +664,7 @@ RetainSummaryManager::getUnarySummary(co
   case cfretain: Effect = Effect.withKind(IncRef); break;
   case cfrelease: Effect = Effect.withKind(DecRef); break;
   case cfautorelease: Effect = Effect.withKind(Autorelease); break;
-  case cfmakecollectable: Effect = Effect.withKind(MakeCollectable); break;
+  case cfmakecollectable: Effect = Effect.withKind(DoNothing); break;
   }
 
   ScratchArgs = AF.add(ScratchArgs, 0, Effect);




More information about the cfe-commits mailing list