[Lldb-commits] [lldb] [lldb] Bring more warnings in compliance with our coding standards (PR #191214)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 9 09:13:17 PDT 2026
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/191214
>From 55951b02387c648795d9aab4fc96111e0621ccfb Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 9 Apr 2026 08:23:23 -0700
Subject: [PATCH 1/2] [lldb] Bring more warnings in compliance with our coding
standards
Similar to #190410 but for warnings this time.
Assisted-by: Claude Code
---
.../Commands/CommandObjectBreakpoint.cpp | 4 ++--
.../source/Commands/CommandObjectCommands.cpp | 4 ++--
.../Commands/CommandObjectDisassemble.cpp | 2 +-
lldb/source/Commands/CommandObjectFrame.cpp | 2 +-
lldb/source/Commands/CommandObjectMemory.cpp | 10 +++++-----
lldb/source/Commands/CommandObjectProcess.cpp | 6 +++---
lldb/source/Commands/CommandObjectSource.cpp | 6 +++---
lldb/source/Commands/CommandObjectTarget.cpp | 20 +++++++++----------
lldb/source/Commands/CommandObjectThread.cpp | 4 ++--
lldb/source/Commands/CommandObjectType.cpp | 6 +++---
lldb/source/Core/Module.cpp | 6 +++---
.../AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 8 ++++----
.../Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 14 ++++++-------
.../Process/gdb-remote/ProcessGDBRemote.cpp | 2 +-
.../SymbolFile/DWARF/DWARFASTParserClang.cpp | 6 +++---
.../SymbolFile/DWARF/SymbolFileDWARF.cpp | 14 ++++++-------
.../func-regex/TestBreakpointRegexError.py | 8 ++++----
.../commands/memory/read/TestMemoryRead.py | 4 ++--
...ile-search-path-symlink-relative-compdir.c | 2 +-
...le-search-paths-dwoname-absolute-compdir.c | 2 +-
...rch-paths-filename-only-absolute-compdir.c | 2 +-
...rch-paths-filename-only-relative-compdir.c | 2 +-
...debug-file-search-paths-relative-compdir.c | 2 +-
.../dwo-relative-filename-only-binary-dir.c | 2 +-
.../DWARF/x86/dwo-not-found-warning.cpp | 2 +-
.../DWARF/x86/dwp-separate-debug-file.cpp | 2 +-
26 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index d78374ddd6edf..ce06bcfe9a744 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -1104,7 +1104,7 @@ class CommandObjectBreakpointAddName : public CommandObjectParsed {
if (!func_regexp.empty()) {
if (func_regexp[0] == '*' || func_regexp[0] == '?')
result.AppendWarning(
- "Function name regex does not accept glob patterns.");
+ "function name regex does not accept glob patterns");
}
return;
}
@@ -1911,7 +1911,7 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
if (m_options.m_func_regexp[0] == '*' ||
m_options.m_func_regexp[0] == '?')
result.AppendWarning(
- "Function name regex does not accept glob patterns.");
+ "function name regex does not accept glob patterns");
}
return;
}
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index fc2da231fdaec..3d623cac35796 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -483,7 +483,7 @@ other command as far as there is only one alias command match.");
if (m_interpreter.AliasExists(alias_command) ||
m_interpreter.UserCommandExists(alias_command)) {
result.AppendWarningWithFormatv(
- "Overwriting existing definition for '{0}'.", alias_command);
+ "overwriting existing definition for '{0}'", alias_command);
}
if (CommandAlias *alias = m_interpreter.AddAlias(
alias_command, cmd_obj_sp, raw_command_string)) {
@@ -579,7 +579,7 @@ other command as far as there is only one alias command match.");
if (m_interpreter.AliasExists(alias_command) ||
m_interpreter.UserCommandExists(alias_command)) {
result.AppendWarningWithFormatv(
- "Overwriting existing definition for '{0}'.", alias_command);
+ "overwriting existing definition for '{0}'", alias_command);
}
if (CommandAlias *alias = m_interpreter.AddAlias(
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 536cd2280fe6f..265f8ff643125 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -499,7 +499,7 @@ void CommandObjectDisassemble::DoExecute(Args &command,
} else if (flavor_string != nullptr && !disassembler->FlavorValidForArchSpec(
m_options.arch, flavor_string))
result.AppendWarningWithFormatv(
- "invalid disassembler flavor \"{0}\", using default.", flavor_string);
+ "invalid disassembler flavor \"{0}\", using default", flavor_string);
result.SetStatus(eReturnStatusSuccessFinishResult);
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 978fa7083de73..263ccde7e02ce 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -917,7 +917,7 @@ void CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
if (interpreter &&
!interpreter->CheckObjectExists(m_options.m_class_name.c_str())) {
- result.AppendWarning("The provided class does not exist - please define it "
+ result.AppendWarning("the provided class does not exist - please define it "
"before attempting to use this frame recognizer");
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index d6d092273830d..5fef613bcafdf 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -360,8 +360,8 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
result.AppendErrorWithFormat("%s takes a start address expression with "
"an optional end address expression.\n",
m_cmd_name.c_str());
- result.AppendWarning("Expressions should be quoted if they contain "
- "spaces or other special characters.");
+ result.AppendWarning("expressions should be quoted if they contain "
+ "spaces or other special characters");
return;
}
@@ -670,8 +670,8 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
}
if (bytes_read < total_byte_size)
- result.AppendWarningWithFormatv("Not all bytes ({0} / {1}) "
- "were able to be read from {2:x}.",
+ result.AppendWarningWithFormatv("not all bytes ({0} / {1}) "
+ "were able to be read from {2:x}",
bytes_read, total_byte_size, addr);
} else {
// we treat c-strings as a special case because they do not have a fixed
@@ -713,7 +713,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
if (item_byte_size == read) {
result.AppendWarningWithFormatv(
"unable to find a NULL terminated string at {0:x}"
- ". Consider increasing the maximum read length.",
+ ". Consider increasing the maximum read length",
data_addr);
--read;
break_on_no_NULL = true;
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index f8c1f29186fe9..183163f21ac90 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -388,12 +388,12 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
new_exec_module_sp->GetFileSpec().GetPath().c_str());
}
} else if (!new_exec_module_sp) {
- result.AppendWarning("No executable binary.");
+ result.AppendWarning("no executable binary");
} else if (old_exec_module_sp->GetFileSpec() !=
new_exec_module_sp->GetFileSpec()) {
result.AppendWarningWithFormatv(
- "Executable binary changed from \"{0}\" to \"{1}\".",
+ "executable binary changed from \"{0}\" to \"{1}\"",
old_exec_module_sp->GetFileSpec().GetPath(),
new_exec_module_sp->GetFileSpec().GetPath());
}
@@ -404,7 +404,7 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
target->GetArchitecture().GetTriple().getTriple().c_str());
} else if (!old_arch_spec.IsExactMatch(target->GetArchitecture())) {
result.AppendWarningWithFormatv(
- "Architecture changed from {0} to {1}.",
+ "architecture changed from {0} to {1}",
old_arch_spec.GetTriple().getTriple(),
target->GetArchitecture().GetTriple().getTriple());
}
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index e8f2f29c6940a..3e323f518a267 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -436,8 +436,8 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
}
}
if (!context_found_for_symbol)
- result.AppendWarningWithFormatv("Unable to find line information"
- " for matching symbol '{0}'.\n",
+ result.AppendWarningWithFormatv("unable to find line information"
+ " for matching symbol '{0}'\n",
sc.GetFunctionName());
}
if (sc_list_lines.GetSize() == 0) {
@@ -543,7 +543,7 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
ModuleSpec module_spec(module_file_spec);
target.GetImages().FindModules(module_spec, m_module_list);
if (m_module_list.IsEmpty())
- result.AppendWarningWithFormatv("No module found for '{0}'.",
+ result.AppendWarningWithFormatv("no module found for '{0}'",
m_options.modules[i]);
}
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 704e6f0819afe..139e60c444d42 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -1930,7 +1930,7 @@ class CommandObjectTargetModulesDumpObjfile
FindModulesByName(&target, arg_cstr, module_list, true);
if (num_matched == 0) {
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
// Dump all the modules we found.
@@ -2068,7 +2068,7 @@ class CommandObjectTargetModulesDumpSymtab
}
} else
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
@@ -2153,7 +2153,7 @@ class CommandObjectTargetModulesDumpSections
Module::GetAllocationModuleCollectionMutex());
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
}
@@ -2286,7 +2286,7 @@ class CommandObjectTargetModulesDumpClangAST
Module::GetAllocationModuleCollectionMutex());
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg.c_str());
+ "unable to find an image that matches '{0}'", arg.c_str());
continue;
}
@@ -2370,7 +2370,7 @@ class CommandObjectTargetModulesDumpSymfile
}
} else
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
@@ -2437,8 +2437,8 @@ class CommandObjectTargetModulesDumpLineTable
num_dumped++;
}
if (num_dumped == 0)
- result.AppendWarningWithFormatv(
- "No source filenames matched '{0}'.", arg_cstr);
+ result.AppendWarningWithFormatv("no source filenames matched '{0}'",
+ arg_cstr);
else
total_num_dumped += num_dumped;
}
@@ -2597,7 +2597,7 @@ class CommandObjectTargetModulesDumpSeparateDebugInfoFiles
}
} else
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
@@ -2646,7 +2646,7 @@ class CommandObjectTargetModulesDumpSeparateDebugInfoFiles
DumpOsoFilesTable(strm, *files);
} else {
result.AppendWarningWithFormatv(
- "Found unsupported debug info type '{0}'.", type);
+ "found unsupported debug info type '{0}'", type);
}
return true;
});
@@ -4123,7 +4123,7 @@ class CommandObjectTargetModulesLookup : public CommandObjectParsed {
}
} else
result.AppendWarningWithFormatv(
- "Unable to find an image that matches '{0}'.", arg_cstr);
+ "unable to find an image that matches '{0}'", arg_cstr);
}
}
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 9f4de72fd1bf3..1ddc62348d744 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -766,7 +766,7 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
if (m_options.m_step_count > 1) {
if (!new_plan_sp->SetIterationCount(m_options.m_step_count)) {
result.AppendWarning(
- "step operation does not support iteration count.");
+ "step operation does not support iteration count");
}
}
@@ -1722,7 +1722,7 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
// "thread return -- -5".
if (command.starts_with("-x")) {
if (command.size() != 2U)
- result.AppendWarning("Return values ignored when returning from user "
+ result.AppendWarning("return values ignored when returning from user "
"called expressions");
Thread *thread = m_exe_ctx.GetThreadPtr();
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 41a0bacc5853e..020374bb0d65c 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -1293,8 +1293,8 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
if (interpreter && !interpreter->CheckObjectExists(funct_name))
result.AppendWarningWithFormatv(
- "The provided function \"{0}\" does not exist - "
- "please define it before attempting to use this summary.",
+ "the provided function \"{0}\" does not exist - "
+ "please define it before attempting to use this summary",
funct_name);
} else if (!m_options.m_python_script
.empty()) // we have a quick 1-line script, just use it
@@ -2197,7 +2197,7 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
const char *python_class_name = impl->GetPythonClassName();
if (interpreter && !interpreter->CheckObjectExists(python_class_name))
result.AppendWarningWithFormatv(
- "The provided class '{0}' does not exist - please define it "
+ "the provided class '{0}' does not exist - please define it "
"before attempting to use this synthetic provider",
llvm::StringRef(python_class_name));
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 0b8d5edd4bab9..85711edcc0022 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1077,7 +1077,7 @@ void Module::ReportWarningOptimization(
StreamString ss;
ss << file_name
<< " was compiled with optimization - stepping may behave "
- "oddly; variables may not be available.";
+ "oddly; variables may not be available";
llvm::StringRef msg = ss.GetString();
Debugger::ReportWarning(msg.str(), debugger_id, GetDiagnosticOnceFlag(msg));
}
@@ -1085,10 +1085,10 @@ void Module::ReportWarningOptimization(
void Module::ReportWarningUnsupportedLanguage(
LanguageType language, std::optional<lldb::user_id_t> debugger_id) {
StreamString ss;
- ss << "This version of LLDB has no plugin for the language \""
+ ss << "this version of LLDB has no plugin for the language \""
<< Language::GetNameForLanguageType(language)
<< "\". "
- "Inspection of frame variables will be limited.";
+ "Inspection of frame variables will be limited";
llvm::StringRef msg = ss.GetString();
Debugger::ReportWarning(msg.str(), debugger_id, GetDiagnosticOnceFlag(msg));
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 231678590f2d4..305c8dd24332d 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2795,20 +2795,20 @@ void AppleObjCRuntimeV2::WarnIfNoClassesCached(
case SharedCacheWarningReason::eNotEnoughClassesRead:
Debugger::ReportWarning("could not find Objective-C class data in "
"the process. This may reduce the quality of type "
- "information available.\n",
+ "information available\n",
debugger.GetID(), &m_no_classes_cached_warning);
break;
case SharedCacheWarningReason::eExpressionExecutionFailure:
Debugger::ReportWarning(
"could not execute support code to read "
"Objective-C class data in the process. This may "
- "reduce the quality of type information available.\n",
+ "reduce the quality of type information available\n",
debugger.GetID(), &m_no_classes_cached_warning);
break;
case SharedCacheWarningReason::eExpressionUnableToRun:
Debugger::ReportWarning(
"could not execute support code to read Objective-C class data because "
- "it's not yet safe to do so, and will be retried later.\n",
+ "it's not yet safe to do so, and will be retried later\n",
debugger.GetID(), nullptr);
break;
}
@@ -2845,7 +2845,7 @@ void AppleObjCRuntimeV2::WarnIfNoExpandedSharedCache() {
} else {
os << "read from the shared cache";
}
- os << ". This will likely reduce debugging performance.\n";
+ os << ". This will likely reduce debugging performance\n";
Debugger::ReportWarning(buffer, debugger.GetID(),
&m_no_expanded_cache_warning);
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 96a8eee91d803..ff975eef18e5d 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -147,7 +147,7 @@ lldb::SectionSP MergeSections(lldb::SectionSP lhs, lldb::SectionSP rhs) {
// Do a sanity check, these should be the same.
if (lhs->GetFileAddress() != rhs->GetFileAddress())
lhs_module_parent->ReportWarning(
- "Mismatch addresses for section {0} when "
+ "mismatch addresses for section {0} when "
"merging with {1}, expected: {2:x}, "
"actual: {3:x}",
lhs->GetTypeAsCString(),
@@ -1573,10 +1573,10 @@ void ObjectFileELF::ParseRISCVAttributes(DataExtractor &data, uint64_t length,
/* EnableExperimentalExtension=*/true);
if (auto error = isa_info.takeError()) {
StreamString ss;
- ss << "The .riscv.attributes section contains an invalid RISC-V arch "
+ ss << "the .riscv.attributes section contains an invalid RISC-V arch "
"string: "
<< llvm::toString(std::move(error))
- << "\n\tThis could result in misleading disassembler output.\n";
+ << "\n\tThis could result in misleading disassembler output\n";
Debugger::ReportWarning(ss.GetString().str());
}
}
@@ -2205,7 +2205,7 @@ std::shared_ptr<ObjectFileELF> ObjectFileELF::GetGnuDebugDataObjectFile() {
if (!lldb_private::lzma::isAvailable()) {
GetModule()->ReportWarning(
- "No LZMA support found for reading .gnu_debugdata section");
+ "no LZMA support found for reading .gnu_debugdata section");
return nullptr;
}
@@ -2216,7 +2216,7 @@ std::shared_ptr<ObjectFileELF> ObjectFileELF::GetGnuDebugDataObjectFile() {
auto err = lldb_private::lzma::uncompress(data.GetData(), uncompressedData);
if (err) {
GetModule()->ReportWarning(
- "An error occurred while decompression the section {0}: {1}",
+ "an error occurred while decompressing the section {0}: {1}",
section->GetName(), llvm::toString(std::move(err)).c_str());
return nullptr;
}
@@ -3996,7 +3996,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
GetByteOrder() == eByteOrderLittle, GetAddressByteSize() == 8);
if (!Decompressor) {
GetModule()->ReportWarning(
- "Unable to initialize decompressor for section '{0}': {1}",
+ "unable to initialize decompressor for section '{0}': {1}",
section->GetName().GetCString(),
llvm::toString(Decompressor.takeError()).c_str());
section_data.Clear();
@@ -4007,7 +4007,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
if (auto error = Decompressor->decompress(
{buffer_sp->GetBytes(), size_t(buffer_sp->GetByteSize())})) {
- GetModule()->ReportWarning("Decompression of section '{0}' failed: {1}",
+ GetModule()->ReportWarning("decompression of section '{0}' failed: {1}",
section->GetName().GetCString(),
llvm::toString(std::move(error)).c_str());
section_data.Clear();
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index e264161c881f1..e2f4b94d05789 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -562,7 +562,7 @@ void ProcessGDBRemote::BuildDynamicRegisterInfo(bool force) {
Debugger::ReportWarning(
"the debug server supports Target Description XML but LLDB does "
"not have XML parsing enabled. Using \"qRegisterInfo\" was also "
- "not possible. Register information may be incorrect or missing.",
+ "not possible. Register information may be incorrect or missing",
GetTarget().GetDebugger().GetID());
}
break;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index fa76260dca63d..29b8c1ce45930 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1216,7 +1216,7 @@ std::pair<bool, TypeSP> DWARFASTParserClang::ParseCXXMethod(
else
dwarf->GetObjectFile()->GetModule()->ReportWarning(
"{0:x8}: DW_AT_specification({1:x16}"
- ") has no decl\n",
+ ") has no decl",
die.GetID(), spec_die.GetOffset());
return {true, nullptr};
@@ -1236,7 +1236,7 @@ std::pair<bool, TypeSP> DWARFASTParserClang::ParseCXXMethod(
else
dwarf->GetObjectFile()->GetModule()->ReportWarning(
"{0:x8}: DW_AT_abstract_origin({1:x16}"
- ") has no decl\n",
+ ") has no decl",
die.GetID(), abs_die.GetOffset());
return {true, nullptr};
@@ -3107,7 +3107,7 @@ void DWARFASTParserClang::ParseSingleMember(
"{0:x16}: {1} ({2}) bitfield named \"{3}\" has invalid "
"bit offset ({4:x8}) member will be ignored. Please file a bug "
"against the "
- "compiler and include the preprocessed output for {5}\n",
+ "compiler and include the preprocessed output for {5}",
die.GetID(), DW_TAG_value_to_name(tag), tag, attrs.name,
this_field_info.bit_offset, GetUnitName(parent_die).c_str());
return;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 7c2682389f86e..aca36b45d69ca 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -666,7 +666,7 @@ uint32_t SymbolFileDWARF::CalculateAbilities() {
if (section && section->GetFileSize() == 1) {
m_objfile_sp->GetModule()->ReportWarning(
"empty dSYM file detected, dSYM was created with an "
- "executable with no debug info.");
+ "executable with no debug info");
}
}
}
@@ -1924,7 +1924,7 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
if (m_dwo_warning_issued.test_and_set(std::memory_order_relaxed) == false) {
GetObjectFile()->GetModule()->ReportWarning(
"unable to locate separate debug file (dwo, dwp). Debugging will be "
- "degraded.");
+ "degraded");
}
return nullptr;
}
@@ -2021,9 +2021,9 @@ void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() {
GetObjectFile()->GetModule()->ReportWarning(
"{0}", error.AsCString("unknown error"));
GetObjectFile()->GetModule()->ReportWarning(
- "Unable to locate module needed for external types.\n"
+ "unable to locate module needed for external types.\n"
"Debugging will be degraded due to missing types. Rebuilding the "
- "project will regenerate the needed module files.");
+ "project will regenerate the needed module files");
continue;
}
@@ -2043,10 +2043,10 @@ void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() {
if (dwo_id != dwo_dwo_id) {
GetObjectFile()->GetModule()->ReportWarning(
- "Module {0} is out-of-date (hash mismatch).\n"
+ "module {0} is out-of-date (hash mismatch).\n"
"Type information from this module may be incomplete or inconsistent "
"with the rest of the program. Rebuilding the project will "
- "regenerate the needed module files.",
+ "regenerate the needed module files",
dwo_module_spec.GetFileSpec().GetPath());
}
}
@@ -2227,7 +2227,7 @@ uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr,
} else {
GetObjectFile()->GetModule()->ReportWarning(
"{0:x16}: compile unit {1} failed to create a valid "
- "lldb_private::CompileUnit class.",
+ "lldb_private::CompileUnit class",
cu_offset, cu_idx);
}
}
diff --git a/lldb/test/API/commands/breakpoint/set/func-regex/TestBreakpointRegexError.py b/lldb/test/API/commands/breakpoint/set/func-regex/TestBreakpointRegexError.py
index a991c5f0106b0..e564ea60d8a7c 100644
--- a/lldb/test/API/commands/breakpoint/set/func-regex/TestBreakpointRegexError.py
+++ b/lldb/test/API/commands/breakpoint/set/func-regex/TestBreakpointRegexError.py
@@ -23,7 +23,7 @@ def test_error(self):
substrs=[
"error: Function name regular expression could "
+ "not be compiled: repetition-operator operand invalid",
- "warning: Function name regex does not accept glob patterns.",
+ "warning: function name regex does not accept glob patterns",
],
)
self.expect(
@@ -32,7 +32,7 @@ def test_error(self):
substrs=[
"error: Function name regular expression could "
+ "not be compiled: repetition-operator operand invalid",
- "warning: Function name regex does not accept glob patterns.",
+ "warning: function name regex does not accept glob patterns",
],
)
# Make sure that warning is only shown for invalid regular expressions
@@ -41,11 +41,11 @@ def test_error(self):
"breakpoint set --func-regex a*+",
error=True,
matching=False,
- substrs=["warning: Function name regex does not accept glob patterns."],
+ substrs=["warning: function name regex does not accept glob patterns"],
)
self.expect(
"breakpoint set --func-regex a?+",
error=True,
matching=False,
- substrs=["warning: Function name regex does not accept glob patterns."],
+ substrs=["warning: function name regex does not accept glob patterns"],
)
diff --git a/lldb/test/API/commands/memory/read/TestMemoryRead.py b/lldb/test/API/commands/memory/read/TestMemoryRead.py
index dbe6d9e7a62ea..8247efed9bd9b 100644
--- a/lldb/test/API/commands/memory/read/TestMemoryRead.py
+++ b/lldb/test/API/commands/memory/read/TestMemoryRead.py
@@ -37,8 +37,8 @@ def test_memory_read_c_string(self):
self.expect(cmd.format(3), substrs=['"ab"'])
self.assertRegex(
self.res.GetError(),
- "unable to find a NULL terminated string at 0x[0-9A-Fa-f]+."
- " Consider increasing the maximum read length.",
+ "unable to find a NULL terminated string at 0x[0-9A-Fa-f]+"
+ ". Consider increasing the maximum read length",
)
@skipIf(archs=no_match("^(riscv|aarch64).*"))
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-path-symlink-relative-compdir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-path-symlink-relative-compdir.c
index 5d83f7c0ec6da..b7f5c1cf329f2 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-path-symlink-relative-compdir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-path-symlink-relative-compdir.c
@@ -23,7 +23,7 @@
// RUN: -O "settings append target.debug-file-search-paths %t.symlink_to_compdir" \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-dwoname-absolute-compdir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-dwoname-absolute-compdir.c
index 43d4d9b75766e..c8daca1fb9f36 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-dwoname-absolute-compdir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-dwoname-absolute-compdir.c
@@ -25,7 +25,7 @@
// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-absolute-compdir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-absolute-compdir.c
index 70b149989ad5b..7b603e14e469a 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-absolute-compdir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-absolute-compdir.c
@@ -24,7 +24,7 @@
// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-relative-compdir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-relative-compdir.c
index 387cb4568a223..2789541fd4638 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-relative-compdir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-filename-only-relative-compdir.c
@@ -19,7 +19,7 @@
// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-relative-compdir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-relative-compdir.c
index ddd0b7f1b4862..b49e2b68182aa 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-relative-compdir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-relative-compdir.c
@@ -20,7 +20,7 @@
// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwo-relative-filename-only-binary-dir.c b/lldb/test/Shell/SymbolFile/DWARF/dwo-relative-filename-only-binary-dir.c
index 384e7a413af68..4ca99e0a10686 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/dwo-relative-filename-only-binary-dir.c
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwo-relative-filename-only-binary-dir.c
@@ -14,7 +14,7 @@
// RUN: %lldb --no-lldbinit %t.compdir/main \
// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
-// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded
// CHECK: (int) 5
int num = 5;
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/dwo-not-found-warning.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/dwo-not-found-warning.cpp
index 36eb299f06630..f82d60b02ef3a 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/dwo-not-found-warning.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/dwo-not-found-warning.cpp
@@ -2,6 +2,6 @@
// RUN: rm %t.dwo
// RUN: %lldb %t.o -o "br set -n main" -o exit 2>&1 | FileCheck %s
-// CHECK: warning: {{.*}} unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// CHECK: warning: {{.*}} unable to locate separate debug file (dwo, dwp). Debugging will be degraded
int main() { return 47; }
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp
index f625fda2087db..40c42628cc573 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp
@@ -177,7 +177,7 @@
// NODWP: Searching for DWP using:
// NODWP: Searching for DWP using:
// NODWP: Unable to locate for DWP file for:
-// NODWP: unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
+// NODWP: unable to locate separate debug file (dwo, dwp). Debugging will be degraded
struct A {
int x = 47;
>From 980725d5cd73cc964af34b5b83ea74c511386584 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 9 Apr 2026 09:12:31 -0700
Subject: [PATCH 2/2] Update tests that are failig in pre-commit CI
---
lldb/test/Shell/Commands/command-type-synthetic-add.test | 2 +-
lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml | 2 +-
lldb/test/Shell/Process/UnsupportedLanguage.test | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lldb/test/Shell/Commands/command-type-synthetic-add.test b/lldb/test/Shell/Commands/command-type-synthetic-add.test
index 3b1c8458e48e1..6302a7b907f44 100644
--- a/lldb/test/Shell/Commands/command-type-synthetic-add.test
+++ b/lldb/test/Shell/Commands/command-type-synthetic-add.test
@@ -3,4 +3,4 @@
# RUN: %lldb -b -o 'type synthetic add --python-class blah blah-name' 2>&1 | FileCheck %s
# CHECK: (lldb) type synthetic
-# CHECK-NEXT: The provided class 'blah' does not exist
+# CHECK-NEXT: the provided class 'blah' does not exist
diff --git a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
index d18243c593b0f..15dcbca54053b 100644
--- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
@@ -7,7 +7,7 @@
# RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s
-# CHECK: warning: (x86_64) {{.*}}.obj No LZMA support found for reading .gnu_debugdata section
+# CHECK: warning: (x86_64) {{.*}}.obj no LZMA support found for reading .gnu_debugdata section
--- !ELF
FileHeader:
diff --git a/lldb/test/Shell/Process/UnsupportedLanguage.test b/lldb/test/Shell/Process/UnsupportedLanguage.test
index ec5d1bd9bace1..85b86bf13ab80 100644
--- a/lldb/test/Shell/Process/UnsupportedLanguage.test
+++ b/lldb/test/Shell/Process/UnsupportedLanguage.test
@@ -10,11 +10,11 @@ RUN: | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >%t.ll
RUN: %clang_host %t.ll -g -o %t.exe
RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s --check-prefix ASM
-ASM-NOT: This version of LLDB has no plugin for the language "assembler"
+ASM-NOT: this version of LLDB has no plugin for the language "assembler"
RUN: %clang_host %S/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o - \
RUN: | sed -e 's/DW_LANG_C99/DW_LANG_Cobol74/g' >%t.ll
RUN: %clang_host %t.ll -g -o %t.exe
RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s --check-prefix COBOL
-COBOL: This version of LLDB has no plugin for the language "cobol74"
+COBOL: this version of LLDB has no plugin for the language "cobol74"
More information about the lldb-commits
mailing list