clang
23.0.0git
include
clang
ScalableStaticAnalysisFramework
Core
TUSummary
TUSummaryExtractor.h
Go to the documentation of this file.
1
//===- TUSummaryExtractor.h -------------------------------------*- C++ -*-===//
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
#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARYEXTRACTOR_H
10
#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARYEXTRACTOR_H
11
12
#include "
clang/AST/ASTConsumer.h
"
13
#include "
clang/AST/Decl.h
"
14
#include "
clang/ScalableStaticAnalysisFramework/Core/Model/EntityId.h
"
15
#include <optional>
16
17
namespace
clang::ssaf
{
18
class
TUSummaryBuilder
;
19
20
class
TUSummaryExtractor
:
public
ASTConsumer
{
21
public
:
22
explicit
TUSummaryExtractor
(
TUSummaryBuilder
&Builder)
23
:
SummaryBuilder
(Builder) {}
24
25
/// Creates EntityName from the Decl, registers the entity, and sets its
26
/// linkage atomically.
27
/// \returns the EntityId, or std::nullopt if EntityName creation fails.
28
std::optional<EntityId>
addEntity
(
const
NamedDecl
*D);
29
30
/// Creates EntityName for the return value of \p FD, registers the entity,
31
/// and sets its linkage atomically.
32
/// \returns the EntityId, or std::nullopt if EntityName creation fails.
33
std::optional<EntityId>
addEntityForReturn
(
const
FunctionDecl
*FD);
34
35
protected
:
36
TUSummaryBuilder
&
SummaryBuilder
;
37
};
38
39
}
// namespace clang::ssaf
40
41
#endif
// LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARYEXTRACTOR_H
ASTConsumer.h
Decl.h
EntityId.h
clang::ASTConsumer::ASTConsumer
ASTConsumer()=default
clang::FunctionDecl
Represents a function declaration or definition.
Definition
Decl.h:2018
clang::NamedDecl
This represents a decl that may have a name.
Definition
Decl.h:274
clang::ssaf::TUSummaryBuilder
Definition
TUSummaryBuilder.h:23
clang::ssaf::TUSummaryExtractor::addEntityForReturn
std::optional< EntityId > addEntityForReturn(const FunctionDecl *FD)
Creates EntityName for the return value of FD, registers the entity, and sets its linkage atomically.
Definition
TUSummaryExtractor.cpp:53
clang::ssaf::TUSummaryExtractor::TUSummaryExtractor
TUSummaryExtractor(TUSummaryBuilder &Builder)
Definition
TUSummaryExtractor.h:22
clang::ssaf::TUSummaryExtractor::SummaryBuilder
TUSummaryBuilder & SummaryBuilder
Definition
TUSummaryExtractor.h:36
clang::ssaf::TUSummaryExtractor::addEntity
std::optional< EntityId > addEntity(const NamedDecl *D)
Creates EntityName from the Decl, registers the entity, and sets its linkage atomically.
Definition
TUSummaryExtractor.cpp:45
clang::ssaf
Definition
CallGraphSummary.h:17
Generated on
for clang by
1.14.0