File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ namespace llvm {
8181 StringRef (std::nullptr_t ) = delete ;
8282
8383 // / Construct a string ref from a cstring.
84- /* implicit*/ constexpr StringRef (const char *Str)
84+ /* implicit*/ constexpr StringRef (const char *Str LLVM_LIFETIME_BOUND )
8585 : View(Str, Str ?
8686 // GCC 7 doesn't have constexpr char_traits. Fall back to __builtin_strlen.
8787#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 8
@@ -93,7 +93,8 @@ namespace llvm {
9393 }
9494
9595 // / Construct a string ref from a pointer and length.
96- /* implicit*/ constexpr StringRef (const char *data, size_t length)
96+ /* implicit*/ constexpr StringRef (const char *data LLVM_LIFETIME_BOUND,
97+ size_t length)
9798 : View(data, length) {}
9899
99100 // / Construct a string ref from an std::string.
You can’t perform that action at this time.
0 commit comments