================
@@ -78,8 +100,11 @@ class ScriptedPythonInterface : virtual public 
ScriptedInterface {
     using namespace python;
     using Locker = ScriptInterpreterPythonImpl::Locker;
 
-    auto create_error = [](std::string message) {
-      return llvm::createStringError(llvm::inconvertibleErrorCode(), message);
+    Log *log = GetLog(LLDBLog::Script);
+    auto create_error = [](llvm::StringRef format, auto &&...ts) {
----------------
bulbazord wrote:

I think it would be better to be specific with the type here: `const char *`.
`llvm::StringRef` may or may not point to a null-terminated string so calling 
`.data()` on the parameter sets off alarm bells in my head. I can manually 
verify that this is never called with anything other than a `const char *` but 
somebody else may not be so careful in the future.

https://github.com/llvm/llvm-project/pull/109063
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to