[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 21:46:42 PST 2024


================
@@ -1889,6 +1889,36 @@ def LifetimeBound : DeclOrTypeAttr {
   let SimpleHandler = 1;
 }
 
+def LifetimeCaptureBy : DeclOrTypeAttr {
+  let Spellings = [Clang<"lifetime_capture_by", 0>];
+  let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>;
+  let Args = [VariadicParamOrParamIdxArgument<"Params">];
+  let Documentation = [LifetimeCaptureByDocs];
+  let AdditionalMembers = [{
+private:
+  IdentifierInfo** ArgIdents;
+  SourceLocation* ArgLocs;
----------------
usx95 wrote:

Done.

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


More information about the cfe-commits mailing list