summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2018-02-28 01:10:04 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2018-02-28 01:10:04 +0000
commit5bc81eb9805acedf505ccebc5d8c9dc188baff65 (patch)
tree8ff9d764b098bf23f39a24d7b024880beebd8b9a /clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
parentb911f1221126d7015e40919662da589658798ac1 (diff)
downloadbcm5719-llvm-5bc81eb9805acedf505ccebc5d8c9dc188baff65.tar.gz
bcm5719-llvm-5bc81eb9805acedf505ccebc5d8c9dc188baff65.zip
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 326292
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp b/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
index c21735b8b88..94edd84d15d 100644
--- a/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
+++ b/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
@@ -1,4 +1,4 @@
-//== FunctionSummary.cpp - Stores summaries of functions. ----------*- C++ -*-//
+//===- FunctionSummary.cpp - Stores summaries of functions. ---------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,21 +12,20 @@
//===----------------------------------------------------------------------===//
#include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h"
+
using namespace clang;
using namespace ento;
unsigned FunctionSummariesTy::getTotalNumBasicBlocks() {
unsigned Total = 0;
- for (MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I) {
- Total += I->second.TotalBasicBlocks;
- }
+ for (const auto &I : Map)
+ Total += I.second.TotalBasicBlocks;
return Total;
}
unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() {
unsigned Total = 0;
- for (MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I) {
- Total += I->second.VisitedBasicBlocks.count();
- }
+ for (const auto &I : Map)
+ Total += I.second.VisitedBasicBlocks.count();
return Total;
}
OpenPOWER on IntegriCloud