clang 22.0.0git
Public Member Functions | Public Attributes | List of all members
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)
 

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 42 of file LifetimeSafety.cpp.

Constructor & Destructor Documentation

◆ Loan()

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

Definition at line 51 of file LifetimeSafety.cpp.

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 46 of file LifetimeSafety.cpp.

Referenced by clang::lifetimes::internal::FactGenerator::VisitUnaryOperator().

◆ IssueExpr

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

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

Definition at line 49 of file LifetimeSafety.cpp.

Referenced by clang::lifetimes::internal::LifetimeChecker::issuePendingWarnings().

◆ Path

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

Definition at line 47 of file LifetimeSafety.cpp.


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