clang
23.0.0git
include
clang
ScalableStaticAnalysis
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_SCALABLESTATICANALYSIS_CORE_TUSUMMARY_TUSUMMARYEXTRACTOR_H
10
#define LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_TUSUMMARY_TUSUMMARYEXTRACTOR_H
11
12
#include "
clang/AST/ASTConsumer.h
"
13
#include "
clang/AST/Decl.h
"
14
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityId.h
"
15
#include <optional>
16
17
namespace
clang::ssaf
{
18
class
SSAFOptions
;
19
class
TUSummaryBuilder
;
20
21
class
TUSummaryExtractor
:
public
ASTConsumer
{
22
public
:
23
explicit
TUSummaryExtractor
(
TUSummaryBuilder
&Builder)
24
:
SummaryBuilder
(Builder) {}
25
26
/// Creates EntityName from the Decl, registers the entity, and sets its
27
/// linkage atomically.
28
/// \returns the EntityId, or std::nullopt if EntityName creation fails.
29
std::optional<EntityId>
addEntity
(
const
NamedDecl
*D);
30
31
/// Creates EntityName for the return value of \p FD, registers the entity,
32
/// and sets its linkage atomically.
33
/// \returns the EntityId, or std::nullopt if EntityName creation fails.
34
std::optional<EntityId>
addEntityForReturn
(
const
FunctionDecl
*FD);
35
36
/// \returns the \c SSAFOptions of the builder.
37
const
SSAFOptions
&
getOptions
()
const
;
38
39
protected
:
40
TUSummaryBuilder
&
SummaryBuilder
;
41
};
42
43
}
// namespace clang::ssaf
44
45
#endif
// LLVM_CLANG_SCALABLESTATICANALYSIS_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:2027
clang::NamedDecl
This represents a decl that may have a name.
Definition
Decl.h:274
clang::ssaf::SSAFOptions
Definition
SSAFOptions.h:18
clang::ssaf::TUSummaryBuilder
Definition
TUSummaryBuilder.h:24
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:71
clang::ssaf::TUSummaryExtractor::TUSummaryExtractor
TUSummaryExtractor(TUSummaryBuilder &Builder)
Definition
TUSummaryExtractor.h:23
clang::ssaf::TUSummaryExtractor::getOptions
const SSAFOptions & getOptions() const
Definition
TUSummaryExtractor.cpp:78
clang::ssaf::TUSummaryExtractor::SummaryBuilder
TUSummaryBuilder & SummaryBuilder
Definition
TUSummaryExtractor.h:40
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:63
clang::ssaf
Definition
CompilerInvocation.h:56
Generated on
for clang by
1.14.0