[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 11 06:44:29 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)
----------------
hokein wrote:
add an eol
https://github.com/llvm/llvm-project/pull/111499
More information about the cfe-commits
mailing list