[llvm] [ADT] Add `[[clang::lifetimebound]]` annotations to Twine.h (PR #210474)
Benedek Kaibas via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 14:53:06 PDT 2026
================
@@ -254,7 +256,7 @@ class Twine {
/// We take care here to optimize "" into the empty twine -- this will be
/// optimized out for string constants. This allows Twine arguments have
/// default "" values, without introducing unnecessary string constants.
- /*implicit*/ Twine(const char *Str) {
+ /*implicit*/ Twine(const char *Str LLVM_LIFETIME_BOUND) {
----------------
benedekaibas wrote:
I think it would make more sense to add annotation incrementally and only annotate the functions that we for sure know won't introduce FPs. I will think about this more and do a commit for it tomorrow.
https://github.com/llvm/llvm-project/pull/210474
More information about the llvm-commits
mailing list