================
@@ -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,
----------------
usx95 wrote:

Let's drop the mention of "borrows" from the analysis. It is already a very 
overloaded term in this domain and since we have been calling these "loans", 
let's us not mix these then.

Let's call them `PathLoan`

```cpp
  /// A loan with an access path to a storage in memory.
  Path,
```

Keeping Placeholder as it is fine to me.

https://github.com/llvm/llvm-project/pull/169767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to