[llvm-branch-commits] [clang] [LifetimeSafety] Support allocating/freeing builtins (PR #213443)

Utkarsh Saxena via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Aug 2 14:12:13 PDT 2026


================
@@ -1086,22 +1086,35 @@ void FactsGenerator::handleFreeingCall(const Expr *Call, const FunctionDecl *FD,
   // arguments, so the index mapping would be off by one.
   if (isa<CXXConstructorDecl>(FD))
     return;
+  if (!isFreeingFunction(*FD))
+    return;
+  auto InvalidateArg = [&](unsigned ArgIndex) {
+    if (ArgIndex >= Args.size())
+      return;
----------------
usx95 wrote:

Is this possible ?
If not, let's add an `assert`.

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


More information about the llvm-branch-commits mailing list