clang 22.0.0git
|
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 () |
Definition at line 1005 of file LifetimeSafety.cpp.
|
inline |
Definition at line 1015 of file LifetimeSafety.cpp.
|
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().
|
inline |
Definition at line 1088 of file LifetimeSafety.cpp.
References clang::lifetimes::internal::LoanManager::getLoan(), clang::lifetimes::internal::FactManager::getLoanMgr(), clang::lifetimes::internal::Loan::IssueExpr, clang::lifetimes::LifetimeSafetyReporter::reportUseAfterFree(), and clang::Warning.
Referenced by run().
|
inline |
Definition at line 1021 of file LifetimeSafety.cpp.
References checkUse(), clang::AnalysisDeclContext::getAnalysis(), clang::lifetimes::internal::FactManager::getFacts(), and issuePendingWarnings().
Referenced by clang::lifetimes::internal::LifetimeSafetyAnalysis::run().