[cfe-commits] r138405 - /cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp

Eric Christopher echristo at apple.com
Tue Aug 23 15:38:04 PDT 2011


Author: echristo
Date: Tue Aug 23 17:38:04 2011
New Revision: 138405

URL: http://llvm.org/viewvc/llvm-project?rev=138405&view=rev
Log:
Revert "[analyzer] Clean up unused bits of CFRefCount."

This reverts commit 6886a92640f5bffc972f67c0a1f302d6c6e7c322.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp?rev=138405&r1=138404&r2=138405&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CFRefCount.cpp Tue Aug 23 17:38:04 2011
@@ -1643,6 +1643,13 @@
   BugType *leakWithinFunction, *leakAtReturn;
   BugType *overAutorelease;
   BugType *returnNotOwnedForOwned;
+  BugReporter *BR;
+
+  const ProgramState *Update(const ProgramState * state,
+                             SymbolRef sym,
+                             RefVal V,
+                             ArgEffect E,
+                             RefVal::Kind& hasErr);
 
 public:
   CFRefCount(ASTContext &Ctx, bool gcenabled, const LangOptions& lopts)
@@ -1650,7 +1657,7 @@
       LOpts(lopts), useAfterRelease(0), releaseNotOwned(0),
       deallocGC(0), deallocNotOwned(0),
       leakWithinFunction(0), leakAtReturn(0), overAutorelease(0),
-      returnNotOwnedForOwned(0) {}
+      returnNotOwnedForOwned(0), BR(0) {}
 
   void RegisterChecks(ExprEngine &Eng);
 
@@ -3748,6 +3755,9 @@
   leakWithinFunction->setSuppressOnSink(true);
   BR.Register(leakWithinFunction);
 
+  // Save the reference to the BugReporter.
+  this->BR = &BR;
+
   // Register the RetainReleaseChecker with the ExprEngine object.
   // Functionality in CFRefCount will be migrated to RetainReleaseChecker
   // over time.





More information about the cfe-commits mailing list