[clang] [clang] Fix GNU spellings of lifetimebound/lifetime_capture_by (PR #192070)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 07:59:07 PDT 2026


================
@@ -48,3 +48,15 @@ struct T {
   void explicit_this1(this T& self, const int &x [[clang::lifetime_capture_by(self)]]);
   void explicit_this2(this T& self, const int &x [[clang::lifetime_capture_by(this)]]); // expected-error {{argument references unavailable implicit 'this'}}
 };
+
+struct GNUCaptureBy {
----------------
zeyi2 wrote:

https://godbolt.org/z/j5r5joad4

This previously would give an error

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


More information about the cfe-commits mailing list