diff options
author | Anna Zaks <ganna@apple.com> | 2011-08-19 22:33:38 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-08-19 22:33:38 +0000 |
commit | f86615ca5c985063be4c898363f28bfd77c90434 (patch) | |
tree | 5e461cfbe2c0fc2a403dd9ea03d08ab8b7f5cc01 /clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp | |
parent | 8022015a166f6a6e2e98e75623578d11a5dae6c5 (diff) | |
download | bcm5719-llvm-f86615ca5c985063be4c898363f28bfd77c90434.tar.gz bcm5719-llvm-f86615ca5c985063be4c898363f28bfd77c90434.zip |
Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*).
1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well.
2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor.
3) Modify all the checkers to use the new API.
llvm-svn: 138126
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp index 1074688562d..7ae966865c8 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp @@ -74,10 +74,10 @@ void UndefResultChecker::checkPostStmt(const BinaryOperator *B, BugReport *report = new BugReport(*BT, OS.str(), N); if (Ex) { report->addRange(Ex->getSourceRange()); - report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, Ex); + report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, Ex)); } else - report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, B); + report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, B)); C.EmitReport(report); } } |