[clang] [LifetimeSafety] Add suggestion and inference for implicit this (PR #176703)
Kashika Akhouri via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 23 10:34:04 PST 2026
================
@@ -2927,6 +2924,30 @@ class LifetimeSafetyReporterImpl : public LifetimeSafetyReporter {
<< EscapeExpr->getSourceRange();
}
+ void suggestLifetimeboundToImplicitThis(SuggestionScope Scope,
+ const CXXMethodDecl *MD,
+ const Expr *EscapeExpr) override {
+ unsigned DiagID = (Scope == SuggestionScope::CrossTU)
+ ? diag::warn_lifetime_safety_cross_tu_this_suggestion
+ : diag::warn_lifetime_safety_intra_tu_this_suggestion;
+
----------------
kashika0112 wrote:
Done
https://github.com/llvm/llvm-project/pull/176703
More information about the cfe-commits
mailing list