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

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 05:51:35 PST 2024


================
@@ -1909,6 +1911,12 @@ void TypePrinter::printAttributedAfter(const AttributedType *T,
     OS << " [[clang::lifetimebound]]";
     return;
   }
+  if (T->getAttrKind() == attr::LifetimeCaptureBy) {
+    // FIXME: Print the attribute arguments once we have a way to retrieve these
----------------
usx95 wrote:

> I think it should be possible since #108631 was merged.
Thanks. Added.

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


More information about the cfe-commits mailing list