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,c --
lldb/include/lldb/Target/TargetAPILock.h
lldb/test/API/functionalities/scripted_frame_provider/register_command_api_mutex_deadlock/main.c
lldb/test/API/functionalities/scripted_frame_provider/sbmutex_reflects_target_mutex/main.c
lldb/unittests/Target/APIMutexHandleTest.cpp
lldb/unittests/Target/TargetAPILockTest.cpp lldb/include/lldb/API/SBMutex.h
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Target/ExecutionContext.h lldb/include/lldb/Target/Target.h
lldb/include/lldb/Utility/Policy.h lldb/include/lldb/ValueObject/ValueObject.h
lldb/include/lldb/lldb-forward.h lldb/source/API/SBAddress.cpp
lldb/source/API/SBBreakpoint.cpp lldb/source/API/SBBreakpointLocation.cpp
lldb/source/API/SBBreakpointName.cpp lldb/source/API/SBCommandInterpreter.cpp
lldb/source/API/SBDebugger.cpp lldb/source/API/SBFunction.cpp
lldb/source/API/SBInstruction.cpp lldb/source/API/SBMutex.cpp
lldb/source/API/SBProcess.cpp lldb/source/API/SBSymbol.cpp
lldb/source/API/SBTarget.cpp lldb/source/API/SBThread.cpp
lldb/source/API/SBValue.cpp lldb/source/API/SBWatchpoint.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
lldb/source/Target/ExecutionContext.cpp lldb/source/Target/Target.cpp
lldb/source/Utility/Policy.cpp lldb/source/ValueObject/ValueObject.cpp
lldb/unittests/Utility/PolicyTest.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/include/lldb/Target/ExecutionContext.h
b/lldb/include/lldb/Target/ExecutionContext.h
index e63b58537..3379b5ea5 100644
--- a/lldb/include/lldb/Target/ExecutionContext.h
+++ b/lldb/include/lldb/Target/ExecutionContext.h
@@ -569,8 +569,7 @@ struct StoppedExecutionContext : ExecutionContext {
StoppedExecutionContext(lldb::TargetSP &target_sp,
lldb::ProcessSP &process_sp,
lldb::ThreadSP &thread_sp,
- lldb::StackFrameSP &frame_sp,
- TargetAPILock api_lock,
+ lldb::StackFrameSP &frame_sp, TargetAPILock api_lock,
ProcessRunLock::ProcessRunLocker stop_locker)
: m_api_lock(std::move(api_lock)), m_stop_locker(std::move(stop_locker))
{
assert(target_sp);
diff --git a/lldb/unittests/Target/APIMutexHandleTest.cpp
b/lldb/unittests/Target/APIMutexHandleTest.cpp
index 8e421855b..21f865aa6 100644
--- a/lldb/unittests/Target/APIMutexHandleTest.cpp
+++ b/lldb/unittests/Target/APIMutexHandleTest.cpp
@@ -1,4 +1,5 @@
-//===-- APIMutexHandleTest.cpp
---------------------------------------------===//
+//===-- APIMutexHandleTest.cpp
+//---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/Target/Target.h"
#include "Plugins/Platform/Linux/PlatformLinux.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Target/Platform.h"
+#include "lldb/Target/Target.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/Policy.h"
#include "gtest/gtest.h"
@@ -77,8 +78,7 @@ TEST_F(APIMutexHandleTest, ResolvesTargetMutex) {
handle.unlock();
}
-TEST_F(APIMutexHandleTest,
- UnlockReplaysLockResolutionAcrossPolicyChange) {
+TEST_F(APIMutexHandleTest, UnlockReplaysLockResolutionAcrossPolicyChange) {
// Regression test for the cross-thread bypass bug: lock() and unlock()
// must agree on which mutex they touch even if the calling thread's
// policy changes in between, because unlock() replays lock()'s
diff --git a/lldb/unittests/Target/TargetAPILockTest.cpp
b/lldb/unittests/Target/TargetAPILockTest.cpp
index 0bbc42812..ea26a0f49 100644
--- a/lldb/unittests/Target/TargetAPILockTest.cpp
+++ b/lldb/unittests/Target/TargetAPILockTest.cpp
@@ -102,7 +102,9 @@ TEST(TargetAPILockTest, DestructorReleasesIfLocked) {
TEST(TargetAPILockTest, DestructorIsANoOpIfNeverLocked) {
std::recursive_mutex mutex;
- { TargetAPILock lock(mutex); }
+ {
+ TargetAPILock lock(mutex);
+ }
std::thread t([&mutex]() {
TargetAPILock background_lock(mutex);
``````````
</details>
https://github.com/llvm/llvm-project/pull/208242
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits