================
@@ -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) {}
----------------
Xazax-hun wrote:
> This is different from borrowing the ParmVarDecl itself.
Whoops, indeed! I wonder if it is better to have a flag in that case to
distinguish between these two cases. It feels wrong to throw away this
information.
> Another thing is that these placeholder loans never expire
Could there still be cases where they are invalidated? E.g. in the earlier
example (even if we do not detect this for now).
```
int* func(std::vector<int>& v [[clang::lifetimebound]]) {
v.push_back(0);
return v[0];
}
```
https://github.com/llvm/llvm-project/pull/169767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits