Coverage Report

Created: 2023-09-30 09:22

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/StaticAnalyzer/Core/FunctionSummary.cpp
Line
Count
Source
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
1.76k
unsigned FunctionSummariesTy::getTotalNumBasicBlocks() {
19
1.76k
  unsigned Total = 0;
20
1.76k
  for (const auto &I : Map)
21
21.9k
    Total += I.second.TotalBasicBlocks;
22
1.76k
  return Total;
23
1.76k
}
24
25
3.38k
unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() {
26
3.38k
  unsigned Total = 0;
27
3.38k
  for (const auto &I : Map)
28
43.8k
    Total += I.second.VisitedBasicBlocks.count();
29
3.38k
  return Total;
30
3.38k
}