diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp index 285b3920fa4..8296eb93c5a 100644 --- a/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp @@ -101,15 +101,14 @@ void AttrNonNullChecker::checkPreStmt(const CallExpr *CE, "API")); BugReport *R = - new BugReport(*BT, - "Null pointer passed as an argument to a " - "'nonnull' parameter", errorNode); + new BugReport(*BT, "Null pointer passed as an argument to a " + "'nonnull' parameter", errorNode); // Highlight the range of the argument that was null. const Expr *arg = *I; R->addRange(arg->getSourceRange()); - R->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, arg); - + R->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(errorNode, + arg)); // Emit the bug report. C.EmitReport(R); } |