[clang] [clang][Sema] Deprecate `global`/`unknown` in `lifetime_capture_by` (PR #196635)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 10 03:26:27 PDT 2026
zmodem wrote:
> Well it doesn't quite break anything it just shows a deprecation warning, you still can use the attribute with that parameter as you used it before.
We're seeing 50k+ warnings from this in Chromium at the moment (and we don't even really use these attributes, but Abseil does). We need a solution that keeps the build warnings free.
> you should just replace all occurances of lifetime_capture_by(this) with lifetime_capture_by_this
But `lifetime_capture_by_this` was only introduced in this PR if I understand correctly, so that would break building with previous Clang versions.
What should code that wishes to build warning-free across different Clang versions do?
https://github.com/llvm/llvm-project/pull/196635
More information about the cfe-commits
mailing list