diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-22 12:29:52 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-22 12:29:52 +0000 |
commit | c3372e0ee8dac4fc11c771a92b05e4641bce6b32 (patch) | |
tree | 9de62213ceb47dc1d33b5579256b08e4417a67c6 /lib/Analysis/UndefinedAssignmentChecker.cpp | |
parent | f1cd5e5c85f2ad433874310d826c1860a262909c (diff) |
Remove UndefinedAssignmentChecker's header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/UndefinedAssignmentChecker.cpp')
-rw-r--r-- | lib/Analysis/UndefinedAssignmentChecker.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Analysis/UndefinedAssignmentChecker.cpp b/lib/Analysis/UndefinedAssignmentChecker.cpp index b8062f3595..0e911ffab0 100644 --- a/lib/Analysis/UndefinedAssignmentChecker.cpp +++ b/lib/Analysis/UndefinedAssignmentChecker.cpp @@ -12,11 +12,29 @@ // //===----------------------------------------------------------------------===// -#include "clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h" +#include "GRExprEngineInternalChecks.h" +#include "clang/Analysis/PathSensitive/CheckerVisitor.h" #include "clang/Analysis/PathSensitive/BugReporter.h" using namespace clang; +namespace { +class VISIBILITY_HIDDEN UndefinedAssignmentChecker + : public CheckerVisitor<UndefinedAssignmentChecker> { + BugType *BT; +public: + UndefinedAssignmentChecker() : BT(0) {} + static void *getTag(); + virtual void PreVisitBind(CheckerContext &C, const Stmt *AssignE, + const Stmt *StoreE, SVal location, + SVal val); +}; +} + +void clang::RegisterUndefinedAssignmentChecker(GRExprEngine &Eng){ + Eng.registerCheck(new UndefinedAssignmentChecker()); +} + void *UndefinedAssignmentChecker::getTag() { static int x = 0; return &x; |