|
clang 24.0.0git
|
#include "clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h"
Classes | |
| class | Impl |
Public Member Functions | |
| LoanPropagationAnalysis (const CFG &C, AnalysisDeclContext &AC, FactManager &F, OriginLoanMap::Factory &OriginLoanMapFactory, LoanSet::Factory &LoanSetFactory) | |
| ~LoanPropagationAnalysis () | |
| LoanSet | getLoans (OriginID OID, ProgramPoint P) const |
| llvm::SmallVector< OriginID > | buildOriginFlowChain (ProgramPoint StartPoint, const OriginID StartOID, const LoanID TargetLoan, const CFG *Cfg) const |
| Builds the chain of origins through which a loan has propagated. | |
| llvm::SmallVector< OriginID > | buildOriginFlowChain (const UseFact *UF, const LoanID TargetLoan, const CFG *Cfg) const |
Like the above, starting from the used origin holding TargetLoan. | |
| llvm::SmallVector< OriginID > | buildOriginFlowChain (const OriginEscapesFact *OEF, const LoanID TargetLoan, const CFG *Cfg) const |
Like the above, starting from the origin OEF lets escape. | |
Definition at line 31 of file LoanPropagation.h.
| clang::lifetimes::internal::LoanPropagationAnalysis::LoanPropagationAnalysis | ( | const CFG & | C, |
| AnalysisDeclContext & | AC, | ||
| FactManager & | F, | ||
| OriginLoanMap::Factory & | OriginLoanMapFactory, | ||
| LoanSet::Factory & | LoanSetFactory ) |
Definition at line 333 of file LoanPropagation.cpp.
References clang::C.
|
default |
| llvm::SmallVector< OriginID > clang::lifetimes::internal::LoanPropagationAnalysis::buildOriginFlowChain | ( | const OriginEscapesFact * | OEF, |
| const LoanID | TargetLoan, | ||
| const CFG * | Cfg ) const |
Like the above, starting from the origin OEF lets escape.
Empty if it does not hold TargetLoan.
Definition at line 359 of file LoanPropagation.cpp.
| llvm::SmallVector< OriginID > clang::lifetimes::internal::LoanPropagationAnalysis::buildOriginFlowChain | ( | const UseFact * | UF, |
| const LoanID | TargetLoan, | ||
| const CFG * | Cfg ) const |
Like the above, starting from the used origin holding TargetLoan.
The casts that load the used variable itself are left out.
Definition at line 354 of file LoanPropagation.cpp.
| llvm::SmallVector< OriginID > clang::lifetimes::internal::LoanPropagationAnalysis::buildOriginFlowChain | ( | ProgramPoint | StartPoint, |
| const OriginID | StartOID, | ||
| const LoanID | TargetLoan, | ||
| const CFG * | Cfg ) const |
Builds the chain of origins through which a loan has propagated.
Starting from the last fact of the block containing StartPoint, this function performs a DFS over CFG blocks to explore all reachable blocks. Within each block, facts are processed in reverse order.
The traversal follows OriginFlowFacts backwards to reconstruct the sequence of origins through which the loan flowed, ending at the origin where the loan was originally issued.
Definition at line 348 of file LoanPropagation.cpp.
| LoanSet clang::lifetimes::internal::LoanPropagationAnalysis::getLoans | ( | OriginID | OID, |
| ProgramPoint | P ) const |
Definition at line 344 of file LoanPropagation.cpp.
Referenced by clang::lifetimes::internal::OriginFlowFact::dump().