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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 03:09:07 PST 2026


================
@@ -610,10 +610,18 @@ void FactsGenerator::markUseAsWrite(const DeclRefExpr *DRE) {
 // parameter at the function's entry.
 llvm::SmallVector<Fact *> FactsGenerator::issuePlaceholderLoans() {
   const auto *FD = dyn_cast<FunctionDecl>(AC.getDecl());
-  if (!FD)
+  if (!FD || FD->isImplicit())
----------------
Xazax-hun wrote:

I actually wonder if we should move the `implicit` checking somewhere earlier? It is not only we do not want to emit these warnings for implicit functions but we actually might not even want to run the analysis on implicit functions. 

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


More information about the cfe-commits mailing list