clang 22.0.0git
clang::lifetimes::internal::FactManager Class Reference

#include "clang/Analysis/Analyses/LifetimeSafety/Facts.h"

Public Member Functions

llvm::ArrayRef< const Fact * > getFacts (const CFGBlock *B) const
void addBlockFacts (const CFGBlock *B, llvm::ArrayRef< Fact * > NewFacts)
template<typename FactType, typename... Args>
FactType * createFact (Args &&...args)
void dump (const CFG &Cfg, AnalysisDeclContext &AC) const
llvm::StringMap< ProgramPointgetTestPoints () const
 Retrieves program points that were specially marked in the source code for testing.
LoanManagergetLoanMgr ()
const LoanManagergetLoanMgr () const
OriginManagergetOriginMgr ()
const OriginManagergetOriginMgr () const

Detailed Description

Definition at line 185 of file Facts.h.

Member Function Documentation

◆ addBlockFacts()

void clang::lifetimes::internal::FactManager::addBlockFacts ( const CFGBlock * B,
llvm::ArrayRef< Fact * > NewFacts )
inline

Definition at line 194 of file Facts.h.

◆ createFact()

template<typename FactType, typename... Args>
FactType * clang::lifetimes::internal::FactManager::createFact ( Args &&... args)
inline

Definition at line 200 of file Facts.h.

◆ dump()

void clang::lifetimes::internal::FactManager::dump ( const CFG & Cfg,
AnalysisDeclContext & AC ) const

◆ getFacts()

llvm::ArrayRef< const Fact * > clang::lifetimes::internal::FactManager::getFacts ( const CFGBlock * B) const
inline

Definition at line 187 of file Facts.h.

Referenced by getTestPoints().

◆ getLoanMgr() [1/2]

LoanManager & clang::lifetimes::internal::FactManager::getLoanMgr ( )
inline

Definition at line 218 of file Facts.h.

Referenced by clang::lifetimes::internal::createLoan().

◆ getLoanMgr() [2/2]

const LoanManager & clang::lifetimes::internal::FactManager::getLoanMgr ( ) const
inline

Definition at line 219 of file Facts.h.

◆ getOriginMgr() [1/2]

OriginManager & clang::lifetimes::internal::FactManager::getOriginMgr ( )
inline

Definition at line 220 of file Facts.h.

◆ getOriginMgr() [2/2]

const OriginManager & clang::lifetimes::internal::FactManager::getOriginMgr ( ) const
inline

Definition at line 221 of file Facts.h.

◆ getTestPoints()

llvm::StringMap< ProgramPoint > clang::lifetimes::internal::FactManager::getTestPoints ( ) const

Retrieves program points that were specially marked in the source code for testing.

The analysis recognizes special function calls of the form void("__lifetime_test_point_<name>") as test points. This method returns a map from the annotation string (<name>) to the corresponding ProgramPoint. This allows test harnesses to query the analysis state at user-defined locations in the code.

Note
This is intended for testing only.

Definition at line 65 of file Facts.cpp.

References clang::Block, and getFacts().


The documentation for this class was generated from the following files: