clang 22.0.0git
Public Member Functions | List of all members
clang::lifetimes::internal::LifetimeChecker Class Reference

Public Member Functions

 LifetimeChecker (LoanPropagationAnalysis &LPA, ExpiredLoansAnalysis &ELA, FactManager &FM, AnalysisDeclContext &ADC, LifetimeSafetyReporter *Reporter)
 
void run ()
 
void checkUse (const UseFact *UF)
 Checks for use-after-free errors for a given use of an Origin.
 
void issuePendingWarnings ()
 

Detailed Description

Definition at line 1005 of file LifetimeSafety.cpp.

Constructor & Destructor Documentation

◆ LifetimeChecker()

clang::lifetimes::internal::LifetimeChecker::LifetimeChecker ( LoanPropagationAnalysis LPA,
ExpiredLoansAnalysis ELA,
FactManager FM,
AnalysisDeclContext ADC,
LifetimeSafetyReporter Reporter 
)
inline

Definition at line 1015 of file LifetimeSafety.cpp.

Member Function Documentation

◆ checkUse()

void clang::lifetimes::internal::LifetimeChecker::checkUse ( const UseFact UF)
inline

Checks for use-after-free errors for a given use of an Origin.

This method is called for each 'UseFact' identified in the control flow graph. It determines if the loans held by the used origin have expired at the point of use.

Definition at line 1035 of file LifetimeSafety.cpp.

References clang::lifetimes::Definite, clang::lifetimes::internal::ExpiredLoansAnalysis::getExpiredLoans(), clang::lifetimes::internal::LoanPropagationAnalysis::getLoans(), clang::lifetimes::internal::UseFact::getUsedOrigin(), clang::lifetimes::internal::UseFact::getUseExpr(), and clang::lifetimes::Maybe.

Referenced by run().

◆ issuePendingWarnings()

void clang::lifetimes::internal::LifetimeChecker::issuePendingWarnings ( )
inline

◆ run()

void clang::lifetimes::internal::LifetimeChecker::run ( )
inline

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