clang 22.0.0git
|
The analysis that tracks which loans belong to which origins. More...
Public Member Functions | |
LoanPropagationAnalysis (const CFG &C, AnalysisDeclContext &AC, FactManager &F, LifetimeFactory &LFactory) | |
StringRef | getAnalysisName () const |
Lattice | getInitialState () |
Lattice | join (Lattice A, Lattice B) |
Merges two lattices by taking the union of loans for each origin. | |
Lattice | transfer (Lattice In, const IssueFact &F) |
A new loan is issued to the origin. Old loans are erased. | |
Lattice | transfer (Lattice In, const OriginFlowFact &F) |
A flow from source to destination. | |
LoanSet | getLoans (OriginID OID, ProgramPoint P) |
Public Member Functions inherited from clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward > | |
void | run () |
Lattice | transfer (Lattice In, const IssueFact &) |
Additional Inherited Members | |
Public Types inherited from clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward > | |
using | Lattice |
using | Base |
Protected Member Functions inherited from clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward > | |
DataflowAnalysis (const CFG &C, AnalysisDeclContext &AC, FactManager &F) | |
Lattice | getState (ProgramPoint P) const |
Lattice | getInState (const CFGBlock *B) const |
Lattice | getOutState (const CFGBlock *B) const |
void | dump () const |
Protected Attributes inherited from clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward > | |
FactManager & | AllFacts |
The analysis that tracks which loans belong to which origins.
Definition at line 1068 of file LifetimeSafety.cpp.
|
inline |
Definition at line 1075 of file LifetimeSafety.cpp.
References clang::C, and clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward >::DataflowAnalysis().
|
inline |
Definition at line 1083 of file LifetimeSafety.cpp.
|
inline |
Definition at line 1085 of file LifetimeSafety.cpp.
|
inline |
Definition at line 1123 of file LifetimeSafety.cpp.
References getLoans(), and clang::lifetimes::internal::DataflowAnalysis< LoanPropagationAnalysis, LoanPropagationLattice, Direction::Forward >::getState().
Referenced by getLoans(), and transfer().
Merges two lattices by taking the union of loans for each origin.
Definition at line 1089 of file LifetimeSafety.cpp.
References clang::lifetimes::internal::utils::join(), and clang::lifetimes::internal::LoanPropagationLattice::Origins.
|
inline |
A new loan is issued to the origin. Old loans are erased.
Definition at line 1099 of file LifetimeSafety.cpp.
References clang::lifetimes::internal::IssueFact::getLoanID(), and clang::lifetimes::internal::IssueFact::getOriginID().
|
inline |
A flow from source to destination.
If KillDest is true, this replaces the destination's loans with the source's. Otherwise, the source's loans are merged into the destination's.
Definition at line 1110 of file LifetimeSafety.cpp.
References clang::lifetimes::internal::OriginFlowFact::getDestOriginID(), clang::lifetimes::internal::OriginFlowFact::getKillDest(), getLoans(), clang::lifetimes::internal::OriginFlowFact::getSrcOriginID(), and clang::lifetimes::internal::utils::join().