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 cpp,h -- 
clang-tools-extra/clangd/IncludeFixer.cpp 
clang-tools-extra/modularize/PreprocessorTracker.cpp 
clang/lib/Driver/ToolChains/Hexagon.cpp 
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp 
clang/unittests/AST/ASTImporterFixtures.cpp 
clang/unittests/Interpreter/CodeCompletionTest.cpp 
clang/unittests/Tooling/HeaderIncludesTest.cpp 
lldb/source/Commands/CommandObjectCommands.cpp 
lldb/source/Commands/CommandObjectHelp.cpp 
lldb/source/Interpreter/CommandInterpreter.cpp 
lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp 
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp 
lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp 
lldb/source/Target/StackFrameList.cpp lldb/tools/yaml2macho-core/yaml2macho.cpp 
llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h 
llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h 
llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp 
llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp 
llvm/tools/llvm-rc/ResourceScriptParser.cpp 
llvm/tools/llvm-rc/ResourceScriptParser.h llvm/tools/sancov/sancov.cpp 
llvm/unittests/ADT/STLExtrasTest.cpp llvm/unittests/CodeGen/PassManagerTest.cpp 
llvm/unittests/TextAPI/TextStubV3Tests.cpp 
llvm/unittests/TextAPI/TextStubV4Tests.cpp 
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp 
mlir/tools/mlir-tblgen/OpDefinitionsGen.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/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index b890431ef..d4cb67245 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -532,8 +532,8 @@ void hexagon::Linker::ConstructJob(Compilation &C, const 
JobAction &JA,
 /// Hexagon Toolchain
 
 std::string HexagonToolChain::getHexagonTargetDir(
-      const std::string &InstalledDir,
-      const SmallVectorImpl<std::string> &PrefixDirs) const {
+    const std::string &InstalledDir,
+    const SmallVectorImpl<std::string> &PrefixDirs) const {
   const Driver &D = getDriver();
 
   // Locate the rest of the toolchain ...
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp 
b/lldb/source/Commands/CommandObjectCommands.cpp
index 4f4602dba..b38bd3a39 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1221,7 +1221,6 @@ private:
   CompletionType m_completion_type = eNoCompletion;
 };
 
-
 /// This command implements a lldb parsed scripted command.  The command
 /// provides a definition of the options and arguments, and a option value
 /// setting callback, and then the command's execution function gets passed
@@ -1239,8 +1238,8 @@ private:
   class CommandOptions : public Options {
   public:
     CommandOptions(CommandInterpreter &interpreter,
-        StructuredData::GenericSP cmd_obj_sp) : m_interpreter(interpreter),
-            m_cmd_obj_sp(cmd_obj_sp) {}
+                   StructuredData::GenericSP cmd_obj_sp)
+        : m_interpreter(interpreter), m_cmd_obj_sp(cmd_obj_sp) {}
 
     ~CommandOptions() override = default;
 
@@ -1248,7 +1247,7 @@ private:
                           ExecutionContext *execution_context) override {
       Status error;
       ScriptInterpreter *scripter =
-        m_interpreter.GetDebugger().GetScriptInterpreter();
+          m_interpreter.GetDebugger().GetScriptInterpreter();
       if (!scripter) {
         return Status::FromErrorString(
             "No script interpreter for SetOptionValue.");
@@ -1268,10 +1267,10 @@ private:
       // Pass the long option, since you aren't actually required to have a
       // short_option, and for those options the index or short option 
character
       // aren't meaningful on the python side.
-      const char * long_option =
-        m_options_definition_up.get()[option_idx].long_option;
-      bool success = scripter->SetOptionValueForCommandObject(m_cmd_obj_sp,
-        execution_context, long_option, option_arg);
+      const char *long_option =
+          m_options_definition_up.get()[option_idx].long_option;
+      bool success = scripter->SetOptionValueForCommandObject(
+          m_cmd_obj_sp, execution_context, long_option, option_arg);
       if (!success)
         return Status::FromErrorStringWithFormatv(
             "Error setting option: {0} to {1}", long_option, option_arg);
@@ -1280,7 +1279,7 @@ private:
 
     void OptionParsingStarting(ExecutionContext *execution_context) override {
       ScriptInterpreter *scripter =
-        m_interpreter.GetDebugger().GetScriptInterpreter();
+          m_interpreter.GetDebugger().GetScriptInterpreter();
       if (!scripter || !m_cmd_obj_sp)
         return;
 
@@ -1294,7 +1293,8 @@ private:
     }
 
     static Status ParseUsageMaskFromArray(StructuredData::ObjectSP obj_sp,
-        size_t counter, uint32_t &usage_mask) {
+                                          size_t counter,
+                                          uint32_t &usage_mask) {
       // If the usage entry is not provided, we use LLDB_OPT_SET_ALL.
       // If the usage mask is a UINT, the option belongs to that group.
       // If the usage mask is a vector of UINT's, the option belongs to all the
@@ -1329,9 +1329,8 @@ private:
       }
       // This is the array ForEach for accumulating a group usage mask from
       // an array of string descriptions of groups.
-      auto groups_accumulator
-          = [counter, &usage_mask, &error]
-            (StructuredData::Object *obj) -> bool {
+      auto groups_accumulator = [counter, &usage_mask,
+                                 &error](StructuredData::Object *obj) -> bool {
         StructuredData::UnsignedInteger *int_val = obj->GetAsUnsignedInteger();
         if (int_val) {
           uint32_t value = int_val->GetValue();
@@ -1391,7 +1390,6 @@ private:
       return error;
     }
 
-
     Status SetOptionsFromArray(StructuredData::Dictionary &options) {
       Status error;
       m_num_options = options.GetSize();
@@ -1405,8 +1403,9 @@ private:
       size_t counter = 0;
       size_t short_opt_counter = 0;
       // This is the Array::ForEach function for adding option elements:
-      auto add_element = [this, &error, &counter, &short_opt_counter]
-          (llvm::StringRef long_option, StructuredData::Object *object) -> 
bool {
+      auto add_element = [this, &error, &counter, &short_opt_counter](
+                             llvm::StringRef long_option,
+                             StructuredData::Object *object) -> bool {
         StructuredData::Dictionary *opt_dict = object->GetAsDictionary();
         if (!opt_dict) {
           error = Status::FromErrorString(
@@ -1429,8 +1428,8 @@ private:
         // Usage Mask:
         StructuredData::ObjectSP obj_sp = opt_dict->GetValueForKey("groups");
         if (obj_sp) {
-          error = ParseUsageMaskFromArray(obj_sp, counter,
-                                          option_def.usage_mask);
+          error =
+              ParseUsageMaskFromArray(obj_sp, counter, option_def.usage_mask);
           if (error.Fail())
             return false;
         }
@@ -1489,8 +1488,8 @@ private:
         // Value Type:
         obj_sp = opt_dict->GetValueForKey("value_type");
         if (obj_sp) {
-          StructuredData::UnsignedInteger *uint_val
-              = obj_sp->GetAsUnsignedInteger();
+          StructuredData::UnsignedInteger *uint_val =
+              obj_sp->GetAsUnsignedInteger();
           if (!uint_val) {
             error = Status::FromErrorStringWithFormatv(
                 "Value type must be an unsigned "
@@ -1575,8 +1574,8 @@ private:
           // Since there are only two fields to specify the enum, use a simple
           // two element array with value first, usage second.
           // counter is only used for reporting so I pass it by value here.
-          auto add_enum = [&enum_ctr, &curr_elem, counter, &error]
-              (StructuredData::Object *object) -> bool {
+          auto add_enum = [&enum_ctr, &curr_elem, counter,
+                           &error](StructuredData::Object *object) -> bool {
             StructuredData::Array *enum_arr = object->GetAsArray();
             if (!enum_arr) {
               error = Status::FromErrorStringWithFormatv(
@@ -1609,8 +1608,8 @@ private:
             }
             llvm::StringRef usage_stref = obj_sp->GetStringValue();
             std::string usage_cstr_str = usage_stref.str().c_str();
-            curr_elem[enum_ctr] = EnumValueStorage(value_cstr_str,
-                usage_cstr_str, enum_ctr);
+            curr_elem[enum_ctr] =
+                EnumValueStorage(value_cstr_str, usage_cstr_str, enum_ctr);
 
             enum_ctr++;
             return true;
@@ -1768,12 +1767,13 @@ private:
       }
 
       EnumValueStorage(std::string in_str_val, std::string in_usage,
-          size_t in_value) : value(std::move(in_str_val)), 
usage(std::move(in_usage)) {
+                       size_t in_value)
+          : value(std::move(in_str_val)), usage(std::move(in_usage)) {
         SetElement(in_value);
       }
 
-      EnumValueStorage(const EnumValueStorage &in) : value(in.value),
-          usage(in.usage) {
+      EnumValueStorage(const EnumValueStorage &in)
+          : value(in.value), usage(in.usage) {
         SetElement(in.element.value);
       }
 
@@ -1816,15 +1816,15 @@ private:
 
 public:
   static CommandObjectSP Create(CommandInterpreter &interpreter,
-                std::string name,
-                StructuredData::GenericSP cmd_obj_sp,
-                ScriptedCommandSynchronicity synch,
-                CommandReturnObject &result) {
+                                std::string name,
+                                StructuredData::GenericSP cmd_obj_sp,
+                                ScriptedCommandSynchronicity synch,
+                                CommandReturnObject &result) {
     CommandObjectSP new_cmd_sp(new CommandObjectScriptingObjectParsed(
         interpreter, name, cmd_obj_sp, synch));
 
-    CommandObjectScriptingObjectParsed *parsed_cmd
-        = static_cast<CommandObjectScriptingObjectParsed *>(new_cmd_sp.get());
+    CommandObjectScriptingObjectParsed *parsed_cmd =
+        static_cast<CommandObjectScriptingObjectParsed *>(new_cmd_sp.get());
     // Now check all the failure modes, and report if found.
     Status opt_error = parsed_cmd->GetOptionsError();
     Status arg_error = parsed_cmd->GetArgsError();
@@ -1844,9 +1844,9 @@ public:
   }
 
   CommandObjectScriptingObjectParsed(CommandInterpreter &interpreter,
-                               std::string name,
-                               StructuredData::GenericSP cmd_obj_sp,
-                               ScriptedCommandSynchronicity synch)
+                                     std::string name,
+                                     StructuredData::GenericSP cmd_obj_sp,
+                                     ScriptedCommandSynchronicity synch)
       : CommandObjectParsed(interpreter, name.c_str()),
         m_cmd_obj_sp(cmd_obj_sp), m_synchro(synch),
         m_options(interpreter, cmd_obj_sp), m_fetched_help_short(false),
@@ -1862,15 +1862,15 @@ public:
     GetFlags().Set(scripter->GetFlagsForCommandObject(cmd_obj_sp));
 
     // Now set up the options definitions from the options:
-    StructuredData::ObjectSP options_object_sp
-        = scripter->GetOptionsForCommandObject(cmd_obj_sp);
+    StructuredData::ObjectSP options_object_sp =
+        scripter->GetOptionsForCommandObject(cmd_obj_sp);
     // It's okay not to have an options dict.
     if (options_object_sp) {
       // The options come as a dictionary of dictionaries.  The key of the
       // outer dict is the long option name (since that's required).  The
       // value holds all the other option specification bits.
-      StructuredData::Dictionary *options_dict
-          = options_object_sp->GetAsDictionary();
+      StructuredData::Dictionary *options_dict =
+          options_object_sp->GetAsDictionary();
       // but if it exists, it has to be an array.
       if (options_dict) {
         m_options_error = m_options.SetOptionsFromArray(*(options_dict));
@@ -1884,8 +1884,8 @@ public:
     }
     // Then fetch the args.  Since the arguments can have usage masks you need
     // an array of arrays.
-    StructuredData::ObjectSP args_object_sp
-      = scripter->GetArgumentsForCommandObject(cmd_obj_sp);
+    StructuredData::ObjectSP args_object_sp =
+        scripter->GetArgumentsForCommandObject(cmd_obj_sp);
     if (args_object_sp) {
       StructuredData::Array *args_array = args_object_sp->GetAsArray();
       if (!args_array) {
@@ -1897,13 +1897,13 @@ public:
 
       // This is the Array::ForEach function that handles the
       // CommandArgumentEntry arrays one by one:
-      auto arg_array_adder = [this, &counter] (StructuredData::Object *object)
-          -> bool {
+      auto arg_array_adder =
+          [this, &counter](StructuredData::Object *object) -> bool {
         // This is the Array::ForEach function to add argument entries:
         CommandArgumentEntry this_entry;
         size_t elem_counter = 0;
-        auto args_adder = [this, counter, &elem_counter, &this_entry]
-            (StructuredData::Object *object) -> bool {
+        auto args_adder = [this, counter, &elem_counter, &this_entry](
+                              StructuredData::Object *object) -> bool {
           // The arguments definition has three fields, the argument type, the
           // repeat and the usage mask.
           CommandArgumentType arg_type = eArgTypeNone;
@@ -1924,11 +1924,11 @@ public:
             return false;
           }
           // Argument Type:
-          StructuredData::ObjectSP obj_sp
-              = arg_dict->GetValueForKey("arg_type");
+          StructuredData::ObjectSP obj_sp =
+              arg_dict->GetValueForKey("arg_type");
           if (obj_sp) {
-            StructuredData::UnsignedInteger *uint_val
-                = obj_sp->GetAsUnsignedInteger();
+            StructuredData::UnsignedInteger *uint_val =
+                obj_sp->GetAsUnsignedInteger();
             if (!uint_val) {
               report_error("value type must be an unsigned integer");
               return false;
@@ -1959,10 +1959,10 @@ public:
 
           // Usage Mask:
           obj_sp = arg_dict->GetValueForKey("groups");
-          m_args_error = CommandOptions::ParseUsageMaskFromArray(obj_sp,
-              counter, arg_opt_set_association);
+          m_args_error = CommandOptions::ParseUsageMaskFromArray(
+              obj_sp, counter, arg_opt_set_association);
           this_entry.emplace_back(arg_type, arg_repetition,
-              arg_opt_set_association);
+                                  arg_opt_set_association);
           elem_counter++;
           return true;
         };
@@ -2522,8 +2522,8 @@ protected:
       }
 
       if (m_options.m_parsed_command) {
-        new_cmd_sp = CommandObjectScriptingObjectParsed::Create(m_interpreter,
-            m_cmd_name, cmd_obj_sp, m_synchronicity, result);
+        new_cmd_sp = CommandObjectScriptingObjectParsed::Create(
+            m_interpreter, m_cmd_name, cmd_obj_sp, m_synchronicity, result);
         if (!result.Succeeded())
           return;
       } else

``````````

</details>


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

Reply via email to