aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-15 22:55:14 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-15 22:55:14 +0000
commitc9f2e0f286500c7e747849b3aa9c0e67a4dc90d7 (patch)
treeda2b341dcd33fcceb973671483226bebe60ee7f0 /lib/StaticAnalyzer/Checkers
parent4bfd680597862e437fcba739dce58531d0b15d6e (diff)
[analyzer] Use the new registration mechanism on the IdempotentOperationChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers')
-rw-r--r--lib/StaticAnalyzer/Checkers/Checkers.td5
-rw-r--r--lib/StaticAnalyzer/Checkers/ExperimentalChecks.h1
-rw-r--r--lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td
index 020cef1fbf..e2d11fedc2 100644
--- a/lib/StaticAnalyzer/Checkers/Checkers.td
+++ b/lib/StaticAnalyzer/Checkers/Checkers.td
@@ -78,6 +78,11 @@ def UnreachableCodeChecker : Checker<"UnreachableCode">,
HelpText<"Check unreachable code">,
DescFile<"UnreachableCodeChecker.cpp">;
+def IdempotentOperationChecker : Checker<"IdempotentOps">,
+ InPackage<CoreExperimental>,
+ HelpText<"Warn about idempotent operations">,
+ DescFile<"IdempotentOperationChecker.cpp">;
+
def ChrootChecker : Checker<"Chroot">,
InPackage<UnixExperimental>,
HelpText<"Check improper use of chroot">,
diff --git a/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h b/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h
index aa87705105..1f38ad77eb 100644
--- a/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h
+++ b/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h
@@ -22,7 +22,6 @@ namespace ento {
class ExprEngine;
void RegisterAnalyzerStatsChecker(ExprEngine &Eng);
-void RegisterIdempotentOperationChecker(ExprEngine &Eng);
void RegisterMallocChecker(ExprEngine &Eng);
} // end GR namespace
diff --git a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
index 2b0753649e..70d5a8b5f0 100644
--- a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
@@ -42,7 +42,7 @@
// - Finer grained false positive control (levels)
// - Handling ~0 values
-#include "ExperimentalChecks.h"
+#include "ClangSACheckers.h"
#include "clang/Analysis/CFGStmtMap.h"
#include "clang/Analysis/Analyses/PseudoConstantAnalysis.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
@@ -132,7 +132,7 @@ void *IdempotentOperationChecker::getTag() {
return &x;
}
-void ento::RegisterIdempotentOperationChecker(ExprEngine &Eng) {
+void ento::registerIdempotentOperationChecker(ExprEngine &Eng) {
Eng.registerCheck(new IdempotentOperationChecker());
}