zmodem wrote:

It's not just Abseil, other code uses it too. Some code uses a 
`CAPTURED_BY(foo)` macro like Abseil, some just uses 
`[[clang::lifetime_capture_by(this)]]` directly.

All of that code will become messier by splitting the macro into separate 
`CAPTURED_BY_THIS` etc. and gating on `__has_cpp_attribute(x)`.

I haven't followed this PR from the start, but are we really sure we want to 
split this attribute into multiple ones? That seems much harder to deal with 
for portable code. Is it worth all the churn it will cause?

If you really do want to split it, how about this as a rollout plan:

1) Land the new attribute now
2) Deprecate the old spelling *after* the Clang 24 version bump (should be 
pretty soon), and with a separate -Wdeprecated-captured-by-this flag
3) In Clang 25, drop the old spelling.

https://github.com/llvm/llvm-project/pull/196635
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to