aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
commitd71ed26dd80cdfebb5bb49000cce538e6c9a90e3 (patch)
treed0461c3b4ee87901490f935c38f35ce8c8e991cd /lib/Analysis/CFRefCount.cpp
parentebe457c3443af253bc14ae77c2013b088370a66b (diff)
Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index efd48218e4..85c8e86500 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -874,22 +874,7 @@ void BadRelease::EmitWarnings(BugReporter& BR) {
}
//===----------------------------------------------------------------------===//
-// Driver for the CFRefCount Checker.
+// Transfer function creation for external clients.
//===----------------------------------------------------------------------===//
-namespace clang {
-
-void CheckCFRefCount(CFG& cfg, Decl& CD, ASTContext& Ctx,
- Diagnostic& Diag, PathDiagnosticClient* PD) {
-
- if (Diag.hasErrorOccurred())
- return;
-
- GRExprEngine Eng(cfg, CD, Ctx);
- CFRefCount TF;
- Eng.setTransferFunctions(TF);
- Eng.ExecuteWorkList();
- Eng.EmitWarnings(Diag, PD);
-}
-
-} // end clang namespace
+GRTransferFuncs* clang::MakeCFRefCountTF() { return new CFRefCount(); }