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

Benedek Kaibas via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 01:37:29 PDT 2026


================
@@ -470,8 +479,8 @@ class Twine {
   /// given SmallVector and a StringRef to the SmallVector's data is returned.
   ///
   /// The returned StringRef's size does not include the null terminator.
-  LLVM_ABI StringRef
-  toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const;
+  LLVM_ABI StringRef toNullTerminatedStringRef(
+      SmallVectorImpl<char> &Out LLVM_LIFETIME_BOUND) const;
----------------
benedekaibas wrote:

Applied changes here: [ea5a904](https://github.com/llvm/llvm-project/pull/210474/commits/ea5a904db2f7a81cb80536f1f11e30c5b23ce5a3)

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


More information about the llvm-commits mailing list