diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-28 00:50:51 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-28 00:50:51 +0000 |
commit | a0f7d35afe89a873f03befe998a45cd77d7b7c9d (patch) | |
tree | 96a376b009036e6cfa31f63c6a63237453467eb0 /clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | |
parent | 72c5515bab16582dcc139c63dfb5df0b8eafcbcc (diff) | |
download | bcm5719-llvm-a0f7d35afe89a873f03befe998a45cd77d7b7c9d.tar.gz bcm5719-llvm-a0f7d35afe89a873f03befe998a45cd77d7b7c9d.zip |
[analyzer] Rename addTrackNullOrUndefValueVisitor to trackNullOrUndefValue.
This helper function (in the clang::ento::bugreporter namespace) may add more
than one visitor, but conceptually it's tracking a single use of a null or
undefined value and should do so as best it can.
Also, the BugReport parameter has been made a reference to underscore that
it is non-optional.
llvm-svn: 162720
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp index dcf6a8603ec..3a68598f5a2 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp @@ -39,12 +39,8 @@ void DivZeroChecker::reportBug(const char *Msg, if (!BT) BT.reset(new BuiltinBug("Division by zero")); - BugReport *R = - new BugReport(*BT, Msg, N); - - bugreporter::addTrackNullOrUndefValueVisitor(N, - bugreporter::GetDenomExpr(N), - R); + BugReport *R = new BugReport(*BT, Msg, N); + bugreporter::trackNullOrUndefValue(N, bugreporter::GetDenomExpr(N), *R); C.EmitReport(R); } } |