================
@@ -268,18 +269,25 @@ class LifetimeChecker {
/// Returns the entity that a parameter escaping through \p OEF is captured
/// by, if a [[clang::lifetime_capture_by]] attribute can name it.
std::optional<Capturer> getCapturer(const OriginEscapesFact &OEF) const {
+ // Index 0 names `this` only with an implicit object parameter; otherwise
+ // it names the first parameter.
+ const auto *MD = dyn_cast<CXXMethodDecl>(FD);
+ bool HasThis = MD && MD->isImplicitObjectMemberFunction();
----------------
NeKon69 wrote:
Would it make sense to use the recently added `hasImplicitObjectArg` here?
https://github.com/llvm/llvm-project/pull/243890
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits