https://github.com/AbdAlRahmanGad updated 
https://github.com/llvm/llvm-project/pull/182629

>From 9a64bd5c1424371ab3c32926ad361d3cb158255d Mon Sep 17 00:00:00 2001
From: AbdAlRahman Gad <[email protected]>
Date: Sat, 21 Feb 2026 02:20:45 +0200
Subject: [PATCH 1/2] [APINotes] Document `Lifetimebound` annotation

---
 clang/docs/APINotes.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/clang/docs/APINotes.rst b/clang/docs/APINotes.rst
index e142cfa62e5a2..d5da0d4c1d0e8 100644
--- a/clang/docs/APINotes.rst
+++ b/clang/docs/APINotes.rst
@@ -447,3 +447,16 @@ declaration kind), all of which are optional:
     - Selector: "initWithFrame:"
       MethodKind: Instance
       DesignatedInit: true
+
+:Lifetimebound:
+  
+  Used for methods and functions (excluding ``this``). Parameters are 
identified by a 0-based
+  'Position'. Equivalent to ``[[clang::lifetimebound]]``.
+
+  ::
+
+    Functions:
+    - Name: funcToAnnotate
+      Parameters:
+      - Position: 0
+        Lifetimebound: true

>From 52528e7a8edce2aba5e8b2e9f83f7d8ee938ae38 Mon Sep 17 00:00:00 2001
From: AbdAlRahman Gad <[email protected]>
Date: Mon, 23 Feb 2026 12:48:26 +0200
Subject: [PATCH 2/2] Remove 'excluding this' as it's already supported

---
 clang/docs/APINotes.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/docs/APINotes.rst b/clang/docs/APINotes.rst
index 5de6b25880846..fe9e4a39c2987 100644
--- a/clang/docs/APINotes.rst
+++ b/clang/docs/APINotes.rst
@@ -516,7 +516,7 @@ declaration kind), all of which are optional:
 
 :Lifetimebound:
   
-  Used for methods and functions (excluding ``this``). Parameters are 
identified by a 0-based
+  Used for methods and functions. Parameters are identified by a 0-based
   'Position'. Equivalent to ``[[clang::lifetimebound]]``.
 
   ::

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to