aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
index ca0a319e53..8ec226abf6 100644
--- a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#include "ClangSACheckers.h"
+#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h"
@@ -74,6 +75,10 @@ void CastToStructChecker::PreVisitCastExpr(CheckerContext &C,
}
}
-void ento::registerCastToStructChecker(ExprEngine &Eng) {
+static void RegisterCastToStructChecker(ExprEngine &Eng) {
Eng.registerCheck(new CastToStructChecker());
}
+
+void ento::registerCastToStructChecker(CheckerManager &mgr) {
+ mgr.addCheckerRegisterFunction(RegisterCastToStructChecker);
+}