github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp --
lldb/include/lldb/Interpreter/Interfaces/ScriptedInterfaceUsages.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/source/Commands/CommandObjectScripting.cpp
lldb/source/Interpreter/Interfaces/ScriptedInterfaceUsages.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Commands/CommandObjectScripting.cpp
b/lldb/source/Commands/CommandObjectScripting.cpp
index 851e501a7..029c6fea2 100644
--- a/lldb/source/Commands/CommandObjectScripting.cpp
+++ b/lldb/source/Commands/CommandObjectScripting.cpp
@@ -150,9 +150,9 @@ public:
Options *GetOptions() override { return &m_options; }
- void HandleArgumentCompletion(
- CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
GetCommandInterpreter(), lldb::eScriptedExtensionCompletion, request,
nullptr);
@@ -222,8 +222,8 @@ protected:
lldb::ScriptedExtension extension =
ScriptInterpreter::StringToExtension(arg.ref());
if (extension == eScriptedExtensionInvalid) {
- result.AppendErrorWithFormat(
- "no scripted extension named '%s'", arg.c_str());
+ result.AppendErrorWithFormat("no scripted extension named '%s'",
+ arg.c_str());
return;
}
llvm::StringLiteral extension_name =
@@ -255,9 +255,9 @@ private:
return languages;
}
- void
- OutputJsonFormat(const llvm::StringMap<std::vector<size_t>>
&grouped_by_extension,
- CommandReturnObject &result) {
+ void OutputJsonFormat(
+ const llvm::StringMap<std::vector<size_t>> &grouped_by_extension,
+ CommandReturnObject &result) {
llvm::json::Array extensions;
for (const auto &extension_pair : grouped_by_extension) {
llvm::StringRef desc =
@@ -272,7 +272,8 @@ private:
// below must be an owned std::string -- otherwise it dangles by the
// time the object tree is serialized at the end of this function.
llvm::json::Array languages;
- for (const std::string &lang :
GetLanguagesForExtension(extension_pair.second))
+ for (const std::string &lang :
+ GetLanguagesForExtension(extension_pair.second))
languages.push_back(lang);
llvm::json::Array api_usages;
@@ -299,9 +300,9 @@ private:
result.SetStatus(eReturnStatusSuccessFinishResult);
}
- void
- OutputTextFormat(const llvm::StringMap<std::vector<size_t>>
&grouped_by_extension,
- CommandReturnObject &result) {
+ void OutputTextFormat(
+ const llvm::StringMap<std::vector<size_t>> &grouped_by_extension,
+ CommandReturnObject &result) {
Stream &s = result.GetOutputStream();
const bool use_color = s.AsRawOstream().colors_enabled();
auto ansi_code = [use_color](llvm::StringRef code) {
@@ -348,12 +349,12 @@ private:
print_field("Name", extension_pair.first(), name_color);
print_field("Description", desc);
- print_field("Language",
- llvm::join(GetLanguagesForExtension(extension_pair.second),
- ""));
+ print_field(
+ "Language",
+ llvm::join(GetLanguagesForExtension(extension_pair.second), ""));
usages.Dump(s, ScriptedInterfaceUsages::UsageKind::API, use_color);
usages.Dump(s, ScriptedInterfaceUsages::UsageKind::CommandInterpreter,
- use_color);
+ use_color);
}
if (!num_listed_interface)
@@ -390,8 +391,8 @@
CommandObjectMultiwordScripting::CommandObjectMultiwordScripting(
LoadSubCommand("run",
CommandObjectSP(new CommandObjectScriptingRun(interpreter)));
LoadSubCommand("extension",
- CommandObjectSP(
- new
CommandObjectMultiwordScriptingExtension(interpreter)));
+ CommandObjectSP(new CommandObjectMultiwordScriptingExtension(
+ interpreter)));
}
CommandObjectMultiwordScripting::~CommandObjectMultiwordScripting() = default;
diff --git a/lldb/source/Interpreter/Interfaces/ScriptedInterfaceUsages.cpp
b/lldb/source/Interpreter/Interfaces/ScriptedInterfaceUsages.cpp
index 3fcbe2018..0f1cc83a7 100644
--- a/lldb/source/Interpreter/Interfaces/ScriptedInterfaceUsages.cpp
+++ b/lldb/source/Interpreter/Interfaces/ScriptedInterfaceUsages.cpp
@@ -17,8 +17,10 @@ void ScriptedInterfaceUsages::Dump(Stream &s, UsageKind kind,
bool use_color) const {
const std::string label =
ansi::FormatAnsiTerminalCodes("${ansi.fg.green}${ansi.bold}", use_color);
- const std::string dim = ansi::FormatAnsiTerminalCodes("${ansi.faint}",
use_color);
- const std::string reset = ansi::FormatAnsiTerminalCodes("${ansi.normal}",
use_color);
+ const std::string dim =
+ ansi::FormatAnsiTerminalCodes("${ansi.faint}", use_color);
+ const std::string reset =
+ ansi::FormatAnsiTerminalCodes("${ansi.normal}", use_color);
s.IndentMore();
s.Indent();
``````````
</details>
https://github.com/llvm/llvm-project/pull/209400
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits