[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 09:44:27 PST 2026


================
@@ -86,6 +86,13 @@ bool doesDeclHaveStorage(const ValueDecl *D) {
   return !D->getType()->isReferenceType();
 }
 
+OriginManager::OriginManager(ASTContext &AST, const Decl *D) : AST(AST) {
+  if (const auto *MD = llvm::dyn_cast_or_null<CXXMethodDecl>(D);
+      MD && MD->isInstance()) {
+    ThisOrigins = buildListForType(MD->getThisType(), MD);
+  }
----------------
usx95 wrote:

nit: remove braces

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


More information about the cfe-commits mailing list