================
@@ -315,8 +315,8 @@ void SBCommandReturnObject::PutCString(const char *string,
int len) {
if (len == 0 || string == nullptr || *string == 0) {
return;
} else if (len > 0) {
- std::string buffer(string, len);
- ref().AppendMessage(buffer.c_str());
+ const llvm::StringRef buffer{string, static_cast<size_t>(len)};
----------------
JDevlieghere wrote:
Why the braces?
https://llvm.org/docs/CodingStandards.html#do-not-use-braced-initializer-lists-to-call-a-constructor
https://github.com/llvm/llvm-project/pull/173365
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits