Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/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
890
unsigned FunctionSummariesTy::getTotalNumBasicBlocks() {
19
890
  unsigned Total = 0;
20
890
  for (const auto &I : Map)
21
15.0k
    Total += I.second.TotalBasicBlocks;
22
890
  return Total;
23
890
}
24
25
890
unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() {
26
890
  unsigned Total = 0;
27
890
  for (const auto &I : Map)
28
15.0k
    Total += I.second.VisitedBasicBlocks.count();
29
890
  return Total;
30
890
}