diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp | 13 |
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; } |