[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 09:48:48 PST 2024
================
@@ -1909,6 +1910,19 @@ void TypePrinter::printAttributedAfter(const AttributedType *T,
OS << " [[clang::lifetimebound]]";
return;
}
+ if (T->getAttrKind() == attr::LifetimeCaptureBy) {
+ OS << " [[clang::lifetime_capture_by(";
+ if (auto *attr = dyn_cast_or_null<LifetimeCaptureByAttr>(T->getAttr())) {
+ auto Idents = attr->getArgIdents();
----------------
usx95 wrote:
Done.
https://github.com/llvm/llvm-project/pull/115823
More information about the cfe-commits
mailing list