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 c,h,cpp -- 
lldb/include/lldb/Target/Policy.h 
lldb/include/lldb/Utility/ThreadLocalPolicyStack.h 
lldb/test/API/functionalities/scripted_frame_provider/runlock_reentrant_deadlock/main.c
 lldb/include/lldb/Host/ProcessRunLock.h lldb/include/lldb/Target/Process.h 
lldb/source/Expression/FunctionCaller.cpp 
lldb/source/Expression/IRInterpreter.cpp 
lldb/source/Expression/LLVMUserExpression.cpp 
lldb/source/Host/common/ProcessRunLock.cpp lldb/source/Target/Process.cpp 
lldb/source/Target/StackFrameList.cpp lldb/source/Target/StopInfo.cpp 
lldb/source/Target/Target.cpp lldb/source/Target/Thread.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/Policy.h 
b/lldb/include/lldb/Target/Policy.h
index a4db5dc54..cd1037893 100644
--- a/lldb/include/lldb/Target/Policy.h
+++ b/lldb/include/lldb/Target/Policy.h
@@ -79,8 +79,7 @@ struct Policy {
   }
 };
 
-using PolicyStack =
-    ThreadLocalPolicyStack<Policy>;
+using PolicyStack = ThreadLocalPolicyStack<Policy>;
 
 } // namespace lldb_private
 
diff --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index 43c2f8a81..145d31e60 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -37,11 +37,11 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SaveCoreOptions.h"
 #include "lldb/Target/CoreFileMemoryRanges.h"
-#include "lldb/Target/Policy.h"
 #include "lldb/Target/ExecutionContextScope.h"
 #include "lldb/Target/InstrumentationRuntime.h"
 #include "lldb/Target/Memory.h"
 #include "lldb/Target/MemoryTagManager.h"
+#include "lldb/Target/Policy.h"
 #include "lldb/Target/QueueList.h"
 #include "lldb/Target/ThreadList.h"
 #include "lldb/Target/ThreadPlanStack.h"
@@ -3335,8 +3335,7 @@ protected:
     }
 
     ProcessRunLock &GetRunLock() {
-      auto &policy =
-          PolicyStack::GetForCurrentThread().Current();
+      auto &policy = PolicyStack::GetForCurrentThread().Current();
       if (policy.view == Policy::View::Private)
         return m_private_run_lock;
       return m_public_run_lock;
diff --git a/lldb/include/lldb/Utility/ThreadLocalPolicyStack.h 
b/lldb/include/lldb/Utility/ThreadLocalPolicyStack.h
index 63ca15609..d24b23a34 100644
--- a/lldb/include/lldb/Utility/ThreadLocalPolicyStack.h
+++ b/lldb/include/lldb/Utility/ThreadLocalPolicyStack.h
@@ -22,8 +22,7 @@ namespace lldb_private {
 /// For thread pool workers that don't inherit thread_local storage, the
 /// policy must be passed into the lambda and pushed onto the worker
 /// thread's stack when the task starts.
-template <typename Policy>
-class ThreadLocalPolicyStack {
+template <typename Policy> class ThreadLocalPolicyStack {
 public:
   static ThreadLocalPolicyStack &GetForCurrentThread() {
     static thread_local ThreadLocalPolicyStack s_stack;
diff --git a/lldb/source/Expression/FunctionCaller.cpp 
b/lldb/source/Expression/FunctionCaller.cpp
index 5b6958039..522261f63 100644
--- a/lldb/source/Expression/FunctionCaller.cpp
+++ b/lldb/source/Expression/FunctionCaller.cpp
@@ -385,8 +385,7 @@ lldb::ExpressionResults FunctionCaller::ExecuteFunction(
   if (exe_ctx.GetProcessPtr())
     exe_ctx.GetProcessPtr()->SetRunningUserExpression(true);
 
-  PolicyStack::Guard expr_policy_guard(
-      Policy::PublicStateRunningExpression());
+  PolicyStack::Guard expr_policy_guard(Policy::PublicStateRunningExpression());
 
   return_value = exe_ctx.GetProcessRef().RunThreadPlan(
       exe_ctx, call_plan_sp, real_options, diagnostic_manager);
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 22bfa80f8..7b35b5445 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -52,8 +52,8 @@
 #include "lldb/Target/MemoryRegionInfo.h"
 #include "lldb/Target/OperatingSystem.h"
 #include "lldb/Target/Platform.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Target/Policy.h"
+#include "lldb/Target/Process.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/StructuredDataPlugin.h"
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index 78f50e584..103ea2400 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -156,8 +156,7 @@ public:
   bool ShouldStopSynchronous(Event *event_ptr) override {
     // Breakpoint callbacks run on the PST during stop processing. Push
     // private state context so callback code sees the private reality.
-    PolicyStack::Guard policy_guard(
-        Policy::PrivateState());
+    PolicyStack::Guard policy_guard(Policy::PrivateState());
 
     ThreadSP thread_sp(m_thread_wp.lock());
     if (thread_sp) {
@@ -330,8 +329,7 @@ protected:
 
     // Breakpoint callbacks run on the PST during stop processing. Push
     // private state context so callback code sees the private reality.
-    PolicyStack::Guard policy_guard(
-        Policy::PrivateState());
+    PolicyStack::Guard policy_guard(Policy::PrivateState());
 
     ThreadSP thread_sp(m_thread_wp.lock());
 
@@ -404,8 +402,7 @@ protected:
 
           ExecutionContext exe_ctx(thread_sp->GetStackFrameAtIndex(0));
           Process *process = exe_ctx.GetProcessPtr();
-          auto &policy =
-              PolicyStack::GetForCurrentThread().Current();
+          auto &policy = PolicyStack::GetForCurrentThread().Current();
           if (!policy.capabilities.can_run_breakpoint_actions) {
             // If we are in the middle of evaluating an expression, don't run
             // asynchronous breakpoint commands or expressions.  That could
@@ -872,8 +869,7 @@ protected:
   bool ShouldStopSynchronous(Event *event_ptr) override {
     // Watchpoint callbacks run on the PST during stop processing. Push
     // private state context so callback code sees the private reality.
-    PolicyStack::Guard policy_guard(
-        Policy::PrivateState());
+    PolicyStack::Guard policy_guard(Policy::PrivateState());
 
     // If we are running our step-over the watchpoint plan, stop if it's done
     // and continue if it's not:
@@ -984,8 +980,7 @@ protected:
   void PerformAction(Event *event_ptr) override {
     // Watchpoint callbacks run on the PST during stop processing. Push
     // private state context so callback code sees the private reality.
-    PolicyStack::Guard policy_guard(
-        Policy::PrivateState());
+    PolicyStack::Guard policy_guard(Policy::PrivateState());
 
     Log *log = GetLog(LLDBLog::Watchpoints);
     // We're going to calculate if we should stop or not in some way during the
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 4ac4b6ddb..2006c3564 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -49,9 +49,9 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Policy.h"
 #include "lldb/Target/Language.h"
 #include "lldb/Target/LanguageRuntime.h"
+#include "lldb/Target/Policy.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/RegisterTypeBuilder.h"
 #include "lldb/Target/SectionLoadList.h"
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 3bc6ed165..b37c5c931 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -23,8 +23,8 @@
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/DynamicLoader.h"
 #include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Policy.h"
 #include "lldb/Target/LanguageRuntime.h"
+#include "lldb/Target/Policy.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/ScriptedThreadPlan.h"

``````````

</details>


https://github.com/llvm/llvm-project/pull/195765
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to