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/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h 
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.cpp
 
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.h
 lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.cpp 
lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.h 
lldb/test/API/functionalities/scripted_symbol_locator/main.c 
lldb/include/lldb/Core/PluginManager.h 
lldb/include/lldb/Interpreter/ScriptInterpreter.h 
lldb/include/lldb/Symbol/LineEntry.h lldb/include/lldb/lldb-forward.h 
lldb/include/lldb/lldb-private-interfaces.h lldb/source/Core/Module.cpp 
lldb/source/Core/PluginManager.cpp 
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.h
 
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
 lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h 
lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp 
lldb/source/Symbol/LineEntry.cpp lldb/source/Target/StackFrame.cpp 
lldb/source/Target/StackFrameList.cpp 
lldb/source/Target/ThreadPlanStepRange.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/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h 
b/lldb/include/lldb/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h
index 26fcb68aa..a9edb23d1 100644
--- a/lldb/include/lldb/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h
+++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h
@@ -1,4 +1,5 @@
-//===-- ScriptedSymbolLocatorInterface.h -------------------------*- C++ 
-*-===//
+//===-- ScriptedSymbolLocatorInterface.h -------------------------*- C++
+//-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h 
b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index 7675ba838..bbd669fd7 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -33,8 +33,8 @@
 #include "lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h"
 #include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h"
 #include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
-#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
 #include "lldb/Interpreter/Interfaces/ScriptedSymbolLocatorInterface.h"
+#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
 #include "lldb/Interpreter/ScriptObject.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Utility/Broadcaster.h"
diff --git a/lldb/source/Core/PluginManager.cpp 
b/lldb/source/Core/PluginManager.cpp
index 5e6bfe343..5b8bcc7cc 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -1511,8 +1511,7 @@ bool PluginManager::RegisterPlugin(
   return GetSymbolLocatorInstances().RegisterPlugin(
       name, description, create_callback, locate_executable_object_file,
       locate_executable_symbol_file, download_object_symbol_file,
-      find_symbol_file_in_bundle, locate_source_file,
-      debugger_init_callback);
+      find_symbol_file_in_bundle, locate_source_file, debugger_init_callback);
 }
 
 bool PluginManager::UnregisterPlugin(
@@ -1596,9 +1595,8 @@ FileSpec PluginManager::FindSymbolFileInBundle(const 
FileSpec &symfile_bundle,
   return {};
 }
 
-FileSpec PluginManager::LocateSourceFile(
-    const lldb::ModuleSP &module_sp,
-    const FileSpec &original_source_file) {
+FileSpec PluginManager::LocateSourceFile(const lldb::ModuleSP &module_sp,
+                                         const FileSpec &original_source_file) 
{
   auto instances = GetSymbolLocatorInstances().GetSnapshot();
   for (auto &instance : instances) {
     if (instance.locate_source_file) {
diff --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.cpp
 
b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.cpp
index 53922d171..f0027bb7d 100644
--- 
a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.cpp
+++ 
b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.cpp
@@ -1,4 +1,5 @@
-//===-- ScriptedSymbolLocatorPythonInterface.cpp 
---------------------------===//
+//===-- ScriptedSymbolLocatorPythonInterface.cpp
+//---------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -54,8 +55,7 @@ static PythonObject ToSWIGModuleSpec(const ModuleSpec 
&module_spec) {
 
   const UUID &uuid = module_spec.GetUUID();
   if (uuid.IsValid())
-    sb_module_spec.SetUUIDBytes(uuid.GetBytes().data(),
-                                uuid.GetBytes().size());
+    sb_module_spec.SetUUIDBytes(uuid.GetBytes().data(), 
uuid.GetBytes().size());
 
   const FileSpec &file = module_spec.GetFileSpec();
   if (file)
@@ -110,8 +110,8 @@ 
ScriptedSymbolLocatorPythonInterface::LocateExecutableObjectFile(
 
   PythonObject py_module_spec = ToSWIGModuleSpec(module_spec);
 
-  auto expected = implementor.CallMethod("locate_executable_object_file",
-                                         py_module_spec);
+  auto expected =
+      implementor.CallMethod("locate_executable_object_file", py_module_spec);
   if (!expected) {
     // Consume the PythonException while the GIL is held. Converting to string
     // forces PythonException destruction before the GIL is released.
@@ -139,8 +139,8 @@ 
ScriptedSymbolLocatorPythonInterface::LocateExecutableObjectFile(
 
 std::optional<FileSpec>
 ScriptedSymbolLocatorPythonInterface::LocateExecutableSymbolFile(
-    const ModuleSpec &module_spec,
-    const FileSpecList &default_search_paths, Status &error) {
+    const ModuleSpec &module_spec, const FileSpecList &default_search_paths,
+    Status &error) {
   if (!m_object_instance_sp)
     return {};
 
@@ -204,10 +204,9 @@ bool 
ScriptedSymbolLocatorPythonInterface::DownloadObjectAndSymbolFile(
 
   PythonObject py_module_spec = ToSWIGModuleSpec(module_spec);
 
-  auto expected = implementor.CallMethod("download_object_and_symbol_file",
-                                         py_module_spec,
-                                         PythonBoolean(force_lookup),
-                                         PythonBoolean(copy_executable));
+  auto expected = implementor.CallMethod(
+      "download_object_and_symbol_file", py_module_spec,
+      PythonBoolean(force_lookup), PythonBoolean(copy_executable));
   if (!expected) {
     std::string msg = llvm::toString(expected.takeError());
     error = Status(msg);
@@ -225,8 +224,7 @@ bool 
ScriptedSymbolLocatorPythonInterface::DownloadObjectAndSymbolFile(
   return obj->GetBooleanValue();
 }
 
-std::optional<FileSpec>
-ScriptedSymbolLocatorPythonInterface::LocateSourceFile(
+std::optional<FileSpec> ScriptedSymbolLocatorPythonInterface::LocateSourceFile(
     const lldb::ModuleSP &module_sp, const FileSpec &original_source_file,
     Status &error) {
   if (!m_object_instance_sp)
@@ -249,8 +247,8 @@ ScriptedSymbolLocatorPythonInterface::LocateSourceFile(
     std::string source_path = original_source_file.GetPath();
     PythonString py_source_path(source_path);
 
-    auto expected = implementor.CallMethod("locate_source_file", py_module,
-                                           py_source_path);
+    auto expected =
+        implementor.CallMethod("locate_source_file", py_module, 
py_source_path);
     if (!expected) {
       // Consume the error (which may contain PythonException) while the GIL
       // is still held. Convert to string to force PythonException destruction
diff --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.h
 
b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.h
index d7d98db9e..35b02a0e5 100644
--- 
a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.h
+++ 
b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSymbolLocatorPythonInterface.h
@@ -1,4 +1,5 @@
-//===-- ScriptedSymbolLocatorPythonInterface.h -------------------*- C++ 
-*-===//
+//===-- ScriptedSymbolLocatorPythonInterface.h -------------------*- C++
+//-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -52,10 +53,9 @@ public:
                                    bool force_lookup,
                                    bool copy_executable) override;
 
-  std::optional<FileSpec>
-  LocateSourceFile(const lldb::ModuleSP &module_sp,
-                   const FileSpec &original_source_file,
-                   Status &error) override;
+  std::optional<FileSpec> LocateSourceFile(const lldb::ModuleSP &module_sp,
+                                           const FileSpec 
&original_source_file,
+                                           Status &error) override;
 
   static llvm::StringRef GetPluginNameStatic() {
     return "ScriptedSymbolLocatorPythonInterface";
diff --git 
a/lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.cpp 
b/lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.cpp
index 82e8c7a67..34b46cf0b 100644
--- a/lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.cpp
+++ b/lldb/source/Plugins/SymbolLocator/Scripted/SymbolLocatorScripted.cpp
@@ -1,4 +1,5 @@
-//===-- SymbolLocatorScripted.cpp 
------------------------------------------===//
+//===-- SymbolLocatorScripted.cpp
+//------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -187,8 +188,9 @@ std::optional<ModuleSpec> 
SymbolLocatorScripted::LocateExecutableObjectFile(
   auto result = interface_sp->LocateExecutableObjectFile(module_spec, error);
   if (!error.Success()) {
     Log *log = GetLog(LLDBLog::Symbols);
-    LLDB_LOG(log, "SymbolLocatorScripted: locate_executable_object_file "
-                  "failed: {0}",
+    LLDB_LOG(log,
+             "SymbolLocatorScripted: locate_executable_object_file "
+             "failed: {0}",
              error);
   }
   return result;
@@ -204,26 +206,28 @@ std::optional<FileSpec> 
SymbolLocatorScripted::LocateExecutableSymbolFile(
       module_spec, default_search_paths, error);
   if (!error.Success()) {
     Log *log = GetLog(LLDBLog::Symbols);
-    LLDB_LOG(log, "SymbolLocatorScripted: locate_executable_symbol_file "
-                  "failed: {0}",
+    LLDB_LOG(log,
+             "SymbolLocatorScripted: locate_executable_symbol_file "
+             "failed: {0}",
              error);
   }
   return result;
 }
 
-bool SymbolLocatorScripted::DownloadObjectAndSymbolFile(
-    ModuleSpec &module_spec, Status &error, bool force_lookup,
-    bool copy_executable) {
+bool SymbolLocatorScripted::DownloadObjectAndSymbolFile(ModuleSpec 
&module_spec,
+                                                        Status &error,
+                                                        bool force_lookup,
+                                                        bool copy_executable) {
   auto interface_sp = GetOrCreateInterface();
   if (!interface_sp)
     return false;
-  return interface_sp->DownloadObjectAndSymbolFile(module_spec, error,
-                                                    force_lookup,
-                                                    copy_executable);
+  return interface_sp->DownloadObjectAndSymbolFile(
+      module_spec, error, force_lookup, copy_executable);
 }
 
-std::optional<FileSpec> SymbolLocatorScripted::LocateSourceFile(
-    const lldb::ModuleSP &module_sp, const FileSpec &original_source_file) {
+std::optional<FileSpec>
+SymbolLocatorScripted::LocateSourceFile(const lldb::ModuleSP &module_sp,
+                                        const FileSpec &original_source_file) {
   if (!module_sp)
     return {};
 
@@ -232,8 +236,7 @@ std::optional<FileSpec> 
SymbolLocatorScripted::LocateSourceFile(
   // Cache resolved source files to avoid repeated Python calls for the same
   // (module, source_file) pair.
   std::string cache_key =
-      module_sp->GetUUID().GetAsString() + ":" +
-      original_source_file.GetPath();
+      module_sp->GetUUID().GetAsString() + ":" + 
original_source_file.GetPath();
 
   std::optional<FileSpec> cached;
   if (props.LookupSourceFileCache(cache_key, cached))
diff --git a/lldb/source/Target/StackFrameList.cpp 
b/lldb/source/Target/StackFrameList.cpp
index a8649a0eb..b46916a9a 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -562,7 +562,8 @@ bool StackFrameList::FetchFramesUpTo(uint32_t end_idx,
 
       while (unwind_sc.GetParentOfInlinedScope(
           curr_frame_address, next_frame_sc, next_frame_address)) {
-        next_frame_sc.line_entry.ApplyFileMappings(target_sp, 
curr_frame_address);
+        next_frame_sc.line_entry.ApplyFileMappings(target_sp,
+                                                   curr_frame_address);
         behaves_like_zeroth_frame = false;
         StackFrameSP frame_sp(new StackFrame(
             m_thread.shared_from_this(), m_frames.size(), idx,
diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp 
b/lldb/source/Target/ThreadPlanStepRange.cpp
index 6c0345d35..a536d0ace 100644
--- a/lldb/source/Target/ThreadPlanStepRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepRange.cpp
@@ -432,8 +432,8 @@ bool ThreadPlanStepRange::SetNextBranchBreakpoint() {
                 std::make_shared<SupportFile>(call_site_file_spec);
             top_most_line_entry.range = range;
             top_most_line_entry.file_sp = std::make_shared<SupportFile>();
-            top_most_line_entry.ApplyFileMappings(
-                GetThread().CalculateTarget(), range.GetBaseAddress());
+            
top_most_line_entry.ApplyFileMappings(GetThread().CalculateTarget(),
+                                                  range.GetBaseAddress());
             if (!top_most_line_entry.file_sp->GetSpecOnly())
               top_most_line_entry.file_sp =
                   top_most_line_entry.original_file_sp;
diff --git a/lldb/test/API/functionalities/scripted_symbol_locator/main.c 
b/lldb/test/API/functionalities/scripted_symbol_locator/main.c
index beef03096..71a79cd90 100644
--- a/lldb/test/API/functionalities/scripted_symbol_locator/main.c
+++ b/lldb/test/API/functionalities/scripted_symbol_locator/main.c
@@ -2,6 +2,4 @@ int func(int argc) {
   return argc + 1; // break here
 }
 
-int main(int argc, const char *argv[]) {
-  return func(argc);
-}
+int main(int argc, const char *argv[]) { return func(argc); }

``````````

</details>


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

Reply via email to