clang 22.0.0git
clang::lifetimes::internal::Loan Struct Reference

Information about a single borrow, or "Loan". More...

Public Member Functions

 Loan (LoanID id, AccessPath path, const Expr *IssueExpr)
void dump (llvm::raw_ostream &OS) const

Public Attributes

LoanID ID
 TODO: Represent opaque loans.
AccessPath Path
const ExprIssueExpr
 The expression that creates the loan, e.g., &x.

Detailed Description

Information about a single borrow, or "Loan".

A loan is created when a reference or pointer is created.

Definition at line 43 of file LifetimeSafety.cpp.

Constructor & Destructor Documentation

◆ Loan()

clang::lifetimes::internal::Loan::Loan ( LoanID id,
AccessPath path,
const Expr * IssueExpr )
inline

Definition at line 52 of file LifetimeSafety.cpp.

References ID, IssueExpr, and Path.

Member Function Documentation

◆ dump()

void clang::lifetimes::internal::Loan::dump ( llvm::raw_ostream & OS) const
inline

Member Data Documentation

◆ ID

LoanID clang::lifetimes::internal::Loan::ID

TODO: Represent opaque loans.

TODO: Represent nullptr: loans to no path. Accessing it UB! Currently it is represented as empty LoanSet

Definition at line 47 of file LifetimeSafety.cpp.

Referenced by dump(), and Loan().

◆ IssueExpr

const Expr* clang::lifetimes::internal::Loan::IssueExpr

The expression that creates the loan, e.g., &x.

Definition at line 50 of file LifetimeSafety.cpp.

Referenced by clang::lifetimes::internal::LifetimeChecker::issuePendingWarnings(), and Loan().

◆ Path

AccessPath clang::lifetimes::internal::Loan::Path

Definition at line 48 of file LifetimeSafety.cpp.

Referenced by dump(), and Loan().


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