[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 22 00:44:57 PDT 2024


================
@@ -1882,6 +1882,46 @@ 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 = [LifetimeBoundDocs];
+  let LangOpts = [CPlusPlus];
+
+  // let SimpleHandler = 1;
+  // let LateParsed = LateAttrParseStandard;
+  // let HasCustomParsing = 1;
+  // let ParseArgumentsAsUnevaluated = 1;
----------------
hokein wrote:

nit: these lines seem irrelevant.

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


More information about the cfe-commits mailing list