[clang] [LifetimeSafety] Add suggestion and inference for implicit this (PR #176703)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 23 08:56:44 PST 2026


================
@@ -1256,6 +1257,10 @@ class Sema final : public SemaBase {
                             bool ForceComplain = false,
                             bool (*IsPlausibleResult)(QualType) = nullptr);
 
+  // Adds inferred lifetime bound attribute for implicit this to its
+  // TypeSourceInfo.
+  void addLifetimeBoundToImplicitThis(const CXXMethodDecl *MD);
----------------
usx95 wrote:

nit: remove `const` here and move the `const_cast` to the caller

https://github.com/llvm/llvm-project/pull/176703


More information about the cfe-commits mailing list