[llvm-branch-commits] [clang] [analyzer] Only bind aggregate lifetime sources in LifetimeModeling for annotated functions (PR #214824)

Benedek Kaibas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Aug 9 12:51:10 PDT 2026


================
@@ -167,6 +167,17 @@ lifetime_modeling::getRegionsFromAggrVal(SVal Val, CheckerContext &C) {
   return {};
 }
 
+static bool isAnnotated(const FunctionDecl *FD) {
+  for (const ParmVarDecl *PVD : FD->parameters()) {
+    if (PVD->hasAttr<LifetimeBoundAttr>())
+      return true;
+  }
+
+  if (lifetimes::implicitObjectParamIsLifetimeBound(FD))
+    return true;
+  return false;
----------------
benedekaibas wrote:

Applied changes here: [57cb609](https://github.com/llvm/llvm-project/pull/214824/commits/57cb6096e6d56dc63bf6637589c2af0dd11495e0)

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


More information about the llvm-branch-commits mailing list