clang
20.0.0git
lib
StaticAnalyzer
Core
FunctionSummary.cpp
Go to the documentation of this file.
1
//===- FunctionSummary.cpp - Stores summaries of functions. ---------------===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines a summary of a function gathered/used by static analysis.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h
"
14
15
using namespace
clang
;
16
using namespace
ento;
17
18
unsigned
FunctionSummariesTy::getTotalNumBasicBlocks
() {
19
unsigned
Total = 0;
20
for
(
const
auto
&I : Map)
21
Total += I.second.TotalBasicBlocks;
22
return
Total;
23
}
24
25
unsigned
FunctionSummariesTy::getTotalNumVisitedBasicBlocks
() {
26
unsigned
Total = 0;
27
for
(
const
auto
&I : Map)
28
Total += I.second.VisitedBasicBlocks.count();
29
return
Total;
30
}
FunctionSummary.h
clang::ento::FunctionSummariesTy::getTotalNumBasicBlocks
unsigned getTotalNumBasicBlocks()
Definition:
FunctionSummary.cpp:18
clang::ento::FunctionSummariesTy::getTotalNumVisitedBasicBlocks
unsigned getTotalNumVisitedBasicBlocks()
Definition:
FunctionSummary.cpp:25
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
Generated on Tue Nov 19 2024 23:05:30 for clang by
1.9.6