[clang] Add support for lifetime capture_by (PR #196884)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 03:11:17 PDT 2026


================
@@ -91,6 +91,11 @@ class FactsGenerator : public ConstStmtVisitor<FactsGenerator> {
   void handleMovedArgsInCall(const FunctionDecl *FD,
                              ArrayRef<const Expr *> Args);
 
+  // Detects [[clang::lifetime_capture_by(X)]] annotations on a function call to
+  // create flow facts from captured arguments to the capturer
----------------
Xazax-hun wrote:

```suggestion
  // Handles [[clang::lifetime_capture_by(X)]] annotations on a function call to
  // create flow facts from captured arguments to the capturer.
```

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


More information about the cfe-commits mailing list