================
@@ -34,46 +34,110 @@ struct AccessPath {
AccessPath(const clang::ValueDecl *D) : D(D) {}
};
-/// Information about a single borrow, or "Loan". A loan is created when a
-/// reference or pointer is created.
-struct Loan {
+/// An abstract base class for a single borrow, or "Loan".
+class Loan {
/// TODO: Represent opaque loans.
/// TODO: Represent nullptr: loans to no path. Accessing it UB! Currently it
/// is represented as empty LoanSet
- LoanID ID;
+public:
+ enum class Kind : uint8_t {
+ /// A regular borrow of a variable within the function that has a path and
+ /// can expire.
+ Borrow,
----------------
kashika0112 wrote:
For now, I have modified the comments, let me know if renaming the borrow word
would be more preferable.
https://github.com/llvm/llvm-project/pull/169767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits