[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 11 06:55:08 PST 2024
================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -ast-dump | FileCheck %s
+
+// Verify that we print the [[clang::lifetime_capture_by(X)]] attribute.
+
+struct S {
+ void foo(int &a, int &b) [[clang::lifetime_capture_by(a, b, global)]];
+};
+
+// CHECK: CXXMethodDecl {{.*}}clang::lifetime_capture_by(a, b, global)
----------------
usx95 wrote:
Done.
https://github.com/llvm/llvm-project/pull/111499
More information about the cfe-commits
mailing list