================
@@ -31,7 +31,7 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
LoanID ID) {
struct AccessPath {
const clang::ValueDecl *D;
- AccessPath(const clang::ValueDecl *D) : D(D) {}
+ AccessPath(const clang::ValueDecl *D = nullptr) : D(D) {}
----------------
kashika0112 wrote:
I have added a bool flag in Loan struct called `IsPlaceholderLoan` and we are
not creating ExpireFacts for the loan if it is a placeholder loan in
`handleLifetimeEnds`. The generated Facts look like this:
```
Function: foo
Block B2:
Issue (0 (Path: a) (Placeholder loan), ToOrigin: 0 (Decl: a))
End of Block
Block B1:
Use (0 (Decl: a), Read)
OriginFlow (Dest: 1 (Expr: ImplicitCastExpr), Src: 0 (Decl: a))
OriginFlow (Dest: 2 (Expr: CXXConstructExpr), Src: 1 (Expr:
ImplicitCastExpr))
OriginEscapes (2 (Expr: CXXConstructExpr))
End of Block
Block B0:
End of Block
```
https://github.com/llvm/llvm-project/pull/169767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits