[Lldb-commits] [lldb] 6979ab2 - [lldb] Remove redundant control flow statements (NFC) (#141183)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 22 22:36:29 PDT 2025
Author: Kazu Hirata
Date: 2025-05-22T22:36:26-07:00
New Revision: 6979ab26555a8640a0470410c2c040fd68bf68ce
URL: https://github.com/llvm/llvm-project/commit/6979ab26555a8640a0470410c2c040fd68bf68ce
DIFF: https://github.com/llvm/llvm-project/commit/6979ab26555a8640a0470410c2c040fd68bf68ce.diff
LOG: [lldb] Remove redundant control flow statements (NFC) (#141183)
Added:
Modified:
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/include/lldb/Target/Process.h
lldb/source/Commands/CommandObjectDiagnostics.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index 3a4a7ae924584..f1c3eefdcd874 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -500,10 +500,8 @@ class ScriptInterpreter : public PluginInterface {
return false;
}
- virtual void OptionParsingStartedForCommandObject(
- StructuredData::GenericSP cmd_obj_sp) {
- return;
- }
+ virtual void
+ OptionParsingStartedForCommandObject(StructuredData::GenericSP cmd_obj_sp) {}
virtual uint32_t
GetFlagsForCommandObject(StructuredData::GenericSP cmd_obj_sp) {
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 536a69fb89759..a8892e9c43225 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -605,7 +605,7 @@ class Process : public std::enable_shared_from_this<Process>,
/// The underlying plugin might store the low-level communication history for
/// this session. Dump it into the provided stream.
- virtual void DumpPluginHistory(Stream &s) { return; }
+ virtual void DumpPluginHistory(Stream &s) {}
/// Launch a new process.
///
diff --git a/lldb/source/Commands/CommandObjectDiagnostics.cpp b/lldb/source/Commands/CommandObjectDiagnostics.cpp
index ac87f869f0127..b565e16e76b53 100644
--- a/lldb/source/Commands/CommandObjectDiagnostics.cpp
+++ b/lldb/source/Commands/CommandObjectDiagnostics.cpp
@@ -96,7 +96,6 @@ class CommandObjectDiagnosticsDump : public CommandObjectParsed {
result.GetOutputStream() << "diagnostics written to " << *directory << '\n';
result.SetStatus(eReturnStatusSuccessFinishResult);
- return;
}
CommandOptions m_options;
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 8c877fc971056..e2ba0008badd3 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -649,8 +649,6 @@ class CommandObjectTargetDelete : public CommandObjectParsed {
result.GetOutputStream().Printf("%u targets deleted.\n",
(uint32_t)num_targets_to_delete);
result.SetStatus(eReturnStatusSuccessFinishResult);
-
- return;
}
OptionGroupOptions m_option_group;
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
index 4b9f463ef5605..b38b65e3545c4 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
@@ -463,7 +463,6 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
template <typename T, typename U>
void ReverseTransform(T &original_arg, U transformed_arg, Status &error) {
// If U is not a PythonObject, don't touch it!
- return;
}
template <typename T>
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
index 1703597a7cd2f..a00127b8e5580 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
@@ -263,7 +263,6 @@ void AppleDWARFIndex::GetTypes(
m_module.LogMessage(log, "FindByNameAndTag()");
const dw_tag_t expected_tag = context[0].tag;
SearchFor(*m_apple_types_up, expected_name, callback, expected_tag);
- return;
}
void AppleDWARFIndex::GetNamespaces(
More information about the lldb-commits
mailing list