[Lldb-commits] [lldb] [lldb][Target][NFC] Update error messages according to LLVM-coding style (PR #181795)

via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 17 02:10:16 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Michael Buch (Michael137)

<details>
<summary>Changes</summary>

The [LLVM coding style guide](https://llvm.org/docs/CodingStandards.html#error-and-warning-messages) says:

> start the first sentence with a lowercase letter, and finish the last sentence
> without a period

This patch updates the erorr messages added in https://github.com/llvm/llvm-project/pull/179208 accordingly.

(addresses https://github.com/llvm/llvm-project/pull/179208#issuecomment-3912273053)

---
Full diff: https://github.com/llvm/llvm-project/pull/181795.diff


1 Files Affected:

- (modified) lldb/source/Target/Target.cpp (+5-6) 


``````````diff
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 07c3653782c6b..f1560a1e74259 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -5380,13 +5380,13 @@ llvm::Error
 EvaluateExpressionOptions::SetBooleanLanguageOption(llvm::StringRef option_name,
                                                     bool value) {
   if (option_name.empty())
-    return llvm::createStringError("Can't set an option with an empty name.");
+    return llvm::createStringError("can't set an option with an empty name");
 
   if (StructuredData::ObjectSP existing_sp =
           GetLanguageOptions().GetValueForKey(option_name);
       existing_sp && existing_sp->GetType() != eStructuredDataTypeBoolean)
-    return llvm::createStringErrorV("Trying to override existing option '{0}' "
-                                    "of type '{1}' with a boolean value.",
+    return llvm::createStringErrorV("trying to override existing option '{0}' "
+                                    "of type '{1}' with a boolean value",
                                     option_name, existing_sp->GetType());
 
   GetLanguageOptions().AddBooleanItem(option_name, value);
@@ -5399,12 +5399,11 @@ llvm::Expected<bool> EvaluateExpressionOptions::GetBooleanLanguageOption(
   const StructuredData::Dictionary &opts = GetLanguageOptions();
 
   if (!opts.HasKey(option_name))
-    return llvm::createStringErrorV("Option '{0}' does not exist.",
-                                    option_name);
+    return llvm::createStringErrorV("option '{0}' does not exist", option_name);
 
   bool result;
   if (!opts.GetValueForKeyAsBoolean(option_name, result))
-    return llvm::createStringErrorV("Failed to get option '{0}' as boolean.",
+    return llvm::createStringErrorV("failed to get option '{0}' as boolean",
                                     option_name);
 
   return result;

``````````

</details>


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


More information about the lldb-commits mailing list