[llvm] [ADT] Add `[[clang::lifetimebound]]` annotations to Twine.h (PR #210474)

Benedek Kaibas via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 19 13:29:11 PDT 2026


================

----------------
benedekaibas wrote:

> Does lifetime analysis track that the copied fields are now bound to the current instance? E.g.: the string that was passed to the origin, now has to oulive the copy as well.

I have written tests for it and it does not warn, so the analysis currently does not track the copied fields.

Test: https://godbolt.org/z/17de96344

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


More information about the llvm-commits mailing list