[Lldb-commits] [lldb] [lldb][enums] Remove broadcast bits from debugger (PR #91618)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 09:29:32 PDT 2024


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 fe0b7983a2f510cdede22cdf6c9227e32ded6a15 f338108d6b0cbb47e72663c58c1cbb17ee446cbc -- lldb/include/lldb/Core/Debugger.h lldb/include/lldb/lldb-enumerations.h lldb/source/Core/Debugger.cpp lldb/source/Core/Progress.cpp lldb/unittests/Core/DiagnosticEventTest.cpp lldb/unittests/Core/ProgressReportTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 1c2d4e378e..9951fbcd3e 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1880,7 +1880,8 @@ lldb::thread_result_t Debugger::DefaultEventHandler() {
 
   listener_sp->StartListeningForEvents(
       &m_broadcaster, lldb::eBroadcastBitProgress | lldb::eBroadcastBitWarning |
-                          lldb::eBroadcastBitError | lldb::eBroadcastSymbolChange);
+                          lldb::eBroadcastBitError |
+                          lldb::eBroadcastSymbolChange);
 
   // Let the thread that spawned us know that we have started up and that we
   // are now listening to all required events so no events get missed
diff --git a/lldb/unittests/Core/DiagnosticEventTest.cpp b/lldb/unittests/Core/DiagnosticEventTest.cpp
index 0916e05f78..1423f76b8b 100644
--- a/lldb/unittests/Core/DiagnosticEventTest.cpp
+++ b/lldb/unittests/Core/DiagnosticEventTest.cpp
@@ -56,8 +56,7 @@ TEST_F(DiagnosticEventTest, Warning) {
 
   listener_sp->StartListeningForEvents(&broadcaster,
                                        lldb::eBroadcastBitWarning);
-  EXPECT_TRUE(
-      broadcaster.EventTypeHasListeners(lldb::eBroadcastBitWarning));
+  EXPECT_TRUE(broadcaster.EventTypeHasListeners(lldb::eBroadcastBitWarning));
 
   Debugger::ReportWarning("foo", debugger_sp->GetID());
 
@@ -80,8 +79,7 @@ TEST_F(DiagnosticEventTest, Error) {
   Broadcaster &broadcaster = debugger_sp->GetBroadcaster();
   ListenerSP listener_sp = Listener::MakeListener("test-listener");
 
-  listener_sp->StartListeningForEvents(&broadcaster,
-                                       lldb::eBroadcastBitError);
+  listener_sp->StartListeningForEvents(&broadcaster, lldb::eBroadcastBitError);
   EXPECT_TRUE(broadcaster.EventTypeHasListeners(lldb::eBroadcastBitError));
 
   Debugger::ReportError("bar", debugger_sp->GetID());
@@ -141,8 +139,7 @@ TEST_F(DiagnosticEventTest, WarningOnce) {
 
   listener_sp->StartListeningForEvents(&broadcaster,
                                        lldb::eBroadcastBitWarning);
-  EXPECT_TRUE(
-      broadcaster.EventTypeHasListeners(lldb::eBroadcastBitWarning));
+  EXPECT_TRUE(broadcaster.EventTypeHasListeners(lldb::eBroadcastBitWarning));
 
   std::once_flag once;
   Debugger::ReportWarning("foo", debugger_sp->GetID(), &once);

``````````

</details>


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


More information about the lldb-commits mailing list