[Lldb-commits] [lldb] e4a03b2 - [lldb] Default initialize CommandOptions fields (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 18 09:07:30 PST 2022


Author: Jonas Devlieghere
Date: 2022-02-18T09:07:25-08:00
New Revision: e4a03b26898e9ca5917a425fc4b089bf5ba19272

URL: https://github.com/llvm/llvm-project/commit/e4a03b26898e9ca5917a425fc4b089bf5ba19272
DIFF: https://github.com/llvm/llvm-project/commit/e4a03b26898e9ca5917a425fc4b089bf5ba19272.diff

LOG: [lldb] Default initialize CommandOptions fields (NFC)

Make sure all fields are default initialized to the same values.

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectCommands.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index ebb84bce7323f..a828ba16e8781 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1480,7 +1480,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
     std::string m_class_name;
     std::string m_funct_name;
     std::string m_short_help;
-    bool m_overwrite;
+    bool m_overwrite = false;
     ScriptedCommandSynchronicity m_synchronicity =
         eScriptedCommandSynchronicitySynchronous;
   };
@@ -1637,8 +1637,9 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
   std::string m_cmd_name;
   CommandObjectMultiword *m_container = nullptr;
   std::string m_short_help;
-  bool m_overwrite;
-  ScriptedCommandSynchronicity m_synchronicity;
+  bool m_overwrite = false;
+  ScriptedCommandSynchronicity m_synchronicity =
+      eScriptedCommandSynchronicitySynchronous;
 };
 
 // CommandObjectCommandsScriptList


        


More information about the lldb-commits mailing list