clang 23.0.0git
clang::ssaf Namespace Reference

Classes

class  BuildNamespace
 Represents a single namespace in the build process. More...
class  EntityId
 Lightweight opaque handle representing an entity in an EntityIdTable. More...
class  EntityIdTable
 Manages entity name interning and provides efficient EntityId handles. More...
class  EntityName
 Uniquely identifies an entity in a program. More...
class  EntitySummary
 Base class for analysis-specific summary data. More...
class  NestedBuildNamespace
 Represents a hierarchical sequence of build namespaces. More...
class  SerializationFormat
 Abstract base class for serialization formats. More...
class  SummaryName
 Uniquely identifies an analysis summary. More...
class  TUSummary
 Data extracted for a given translation unit and for a given set of analyses. More...
class  TUSummaryBuilder
class  TUSummaryExtractor

Typedefs

using TUSummaryExtractorRegistry

Enumerations

enum class  BuildNamespaceKind : unsigned short { CompilationUnit , LinkUnit }

Functions

std::optional< EntityNamegetEntityName (const Decl *D)
 Maps a declaration to an EntityName.
std::optional< EntityNamegetEntityNameForReturn (const FunctionDecl *FD)
 Maps return entity of a function to an EntityName.
llvm::StringRef toString (BuildNamespaceKind BNK)
std::optional< BuildNamespaceKindparseBuildNamespaceKind (llvm::StringRef Str)
bool isTUSummaryExtractorRegistered (llvm::StringRef SummaryName)
 Check if a TUSummaryExtractor was registered with a given name.
std::unique_ptr< ASTConsumermakeTUSummaryExtractor (llvm::StringRef SummaryName, TUSummaryBuilder &Builder)
 Try to instantiate a TUSummaryExtractor with a given name.

Typedef Documentation

◆ TUSummaryExtractorRegistry

Initial value:
llvm::Registry<TUSummaryExtractor, TUSummaryBuilder &>

Definition at line 38 of file ExtractorRegistry.h.

Enumeration Type Documentation

◆ BuildNamespaceKind

enum class clang::ssaf::BuildNamespaceKind : unsigned short
strong
Enumerator
CompilationUnit 
LinkUnit 

Definition at line 29 of file BuildNamespace.h.

Function Documentation

◆ getEntityName()

std::optional< EntityName > clang::ssaf::getEntityName ( const Decl * D)

Maps a declaration to an EntityName.

Supported declaration types for entity mapping:

  • Functions and methods
  • Global Variables
  • Function parameters
  • Struct/class/union type definitions
  • Struct/class/union fields

Implicit declarations and compiler builtins are not mapped.

Parameters
DThe declaration to map. Must not be null.
Returns
An EntityName if the declaration can be mapped, std::nullopt otherwise.

Definition at line 21 of file ASTEntityMapping.cpp.

References clang::cast(), clang::index::generateUSRForDecl(), clang::isa(), and clang::Decl::isImplicit().

◆ getEntityNameForReturn()

std::optional< EntityName > clang::ssaf::getEntityNameForReturn ( const FunctionDecl * FD)

Maps return entity of a function to an EntityName.

The returned name uniquely identifies the return value of function

Parameters
FD.
FDThe function declaration. Must not be null.
Returns
An EntityName for the function's return entity.

Definition at line 62 of file ASTEntityMapping.cpp.

References clang::index::generateUSRForDecl(), clang::FunctionDecl::getBuiltinID(), and clang::Decl::isImplicit().

◆ isTUSummaryExtractorRegistered()

bool clang::ssaf::isTUSummaryExtractorRegistered ( llvm::StringRef SummaryName)

Check if a TUSummaryExtractor was registered with a given name.

Definition at line 20 of file ExtractorRegistry.cpp.

◆ makeTUSummaryExtractor()

std::unique_ptr< ASTConsumer > clang::ssaf::makeTUSummaryExtractor ( llvm::StringRef SummaryName,
TUSummaryBuilder & Builder )

Try to instantiate a TUSummaryExtractor with a given name.

This might return null if the construction of the desired TUSummaryExtractor failed. It's a fatal error if there is no extractor registered with the name.

Definition at line 28 of file ExtractorRegistry.cpp.

◆ parseBuildNamespaceKind()

std::optional< BuildNamespaceKind > clang::ssaf::parseBuildNamespaceKind ( llvm::StringRef Str)

Definition at line 25 of file BuildNamespace.cpp.

References CompilationUnit, and LinkUnit.

◆ toString()

llvm::StringRef clang::ssaf::toString ( BuildNamespaceKind BNK)

Definition at line 15 of file BuildNamespace.cpp.

References CompilationUnit, and LinkUnit.