diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-18 01:11:52 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-18 01:11:52 +0000 |
commit | 704b4fbbf686454cf11f6141ea1c823db5694b24 (patch) | |
tree | ad3304559535f443218d59460f8f13425b2a4258 /clang/lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | be42c4aec8f58ef68ea5655fbedb8a141b2462cd (diff) | |
download | bcm5719-llvm-704b4fbbf686454cf11f6141ea1c823db5694b24.tar.gz bcm5719-llvm-704b4fbbf686454cf11f6141ea1c823db5694b24.zip |
[Statistics] Use the new Statistic::updateMax to atomically calculate a maximum value statistic.
llvm-svn: 303320
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index 2114033ba8b..2c3169c0f8d 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -3448,14 +3448,12 @@ void BugReporter::FlushReport(BugReport *exampleReport, // the BugReporterVisitors may mark this bug as a false positive. assert(!bugReports.empty()); - MaxBugClassSize = - std::max(bugReports.size(), static_cast<size_t>(MaxBugClassSize)); + MaxBugClassSize.updateMax(bugReports.size()); if (!generatePathDiagnostic(*D.get(), PD, bugReports)) return; - MaxValidBugClassSize = - std::max(bugReports.size(), static_cast<size_t>(MaxValidBugClassSize)); + MaxValidBugClassSize.updateMax(bugReports.size()); // Examine the report and see if the last piece is in a header. Reset the // report location to the last piece in the main source file. |