1 //===- FunctionSummary.cpp - Stores summaries of functions. ---------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file defines a summary of a function gathered/used by static analysis.
11 //===----------------------------------------------------------------------===//
13 #include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h"
15 using namespace clang
;
18 unsigned FunctionSummariesTy::getTotalNumBasicBlocks() {
20 for (const auto &I
: Map
)
21 Total
+= I
.second
.TotalBasicBlocks
;
25 unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() {
27 for (const auto &I
: Map
)
28 Total
+= I
.second
.VisitedBasicBlocks
.count();