[lldb] Replace make_error<StringError> with createStringError* (NFC) (#185748)

This makes the constructions of string errors more concise and more
consistent, mainly by removing the `inconvertibleErrorCode()`.
Additional changes replace `createStringError(formatv(...), ...)` with
`createStringErrorV(...)`.

Assisted-by: Claude
This commit is contained in:
Dave Lee authored and GitHub committed 2026-03-11 10:46:55 -07:00
1 parent d371f42a47
commit e10833d845
26 files changed
+166 -263

No files matched your search

@@ -462,8 +462,7 @@ public:
// Call the static method.
llvm::Expected<PythonObject> expected_return_object =
llvm::make_error<llvm::StringError>("Not initialized.",
llvm::inconvertibleErrorCode());
llvm::createStringError("Not initialized.");
std::apply(
[&method, &expected_return_object](auto &&...args) {
llvm::consumeError(expected_return_object.takeError());
@@ -526,8 +525,7 @@ protected:
auto transformed_args = TransformArgs(original_args);
llvm::Expected<PythonObject> expected_return_object =
llvm::make_error<llvm::StringError>("Not initialized.",
llvm::inconvertibleErrorCode());
llvm::createStringError("Not initialized.");
std::apply(
[&implementor, &method_name, &expected_return_object](auto &&...args) {
llvm::consumeError(expected_return_object.takeError());