[Lldb-commits] [PATCH 2/3] Order of initialization lists.

Marco Minutoli mminutoli at gmail.com
Mon Apr 11 01:38:21 PDT 2011


This patch fix all the warning due to unordered initialization lists.
---
 include/lldb/Utility/CleanUp.h                     |    2 +-
 source/Core/EmulateInstruction.cpp                 |    2 +-
 source/Core/ValueObject.cpp                        |   23 ++++++++++---------
 source/Expression/ASTStructExtractor.cpp           |    4 +-
 source/Expression/ClangExpressionDeclMap.cpp       |    4 +-
 source/Expression/ClangExpressionVariable.cpp      |    8 +++---
 source/Expression/ClangUserExpression.cpp          |    4 +-
 source/Expression/IRDynamicChecks.cpp              |    4 +-
 source/Expression/IRForTarget.cpp                  |    8 +++---
 source/Expression/IRToDWARF.cpp                    |    4 +-
 .../Process/Utility/RegisterContextLLDB.cpp        |   22 +++++++++---------
 .../Process/Utility/UnwindAssemblyProfiler-x86.cpp |    4 +-
 source/Symbol/DWARFCallFrameInfo.cpp               |    4 +-
 source/Symbol/Symbol.cpp                           |    8 +++---
 source/Symbol/Type.cpp                             |    4 +-
 source/Symbol/UnwindTable.cpp                      |    4 +-
 source/Target/StackFrameList.cpp                   |    4 +-
 source/Target/Target.cpp                           |    8 +++---
 source/Target/ThreadPlanTestCondition.cpp          |    2 +-
 source/Target/ThreadPlanTracer.cpp                 |    4 +-
 tools/driver/Driver.cpp                            |    4 +-
 21 files changed, 66 insertions(+), 65 deletions(-)

diff --git a/include/lldb/Utility/CleanUp.h b/include/lldb/Utility/CleanUp.h
index 35eda02..9f7b169 100644
--- a/include/lldb/Utility/CleanUp.h
+++ b/include/lldb/Utility/CleanUp.h
@@ -80,8 +80,8 @@ public:
     //----------------------------------------------------------------------
     CleanUp (value_type value, value_type invalid, CallbackType callback) : 
         m_current_value (value),
-        m_callback (callback),
         m_invalid_value (invalid),
+        m_callback (callback),
         m_callback_called (false),
         m_invalid_value_is_valid (true)
     {
diff --git a/source/Core/EmulateInstruction.cpp b/source/Core/EmulateInstruction.cpp
index e828dbc..5a7006b 100644
--- a/source/Core/EmulateInstruction.cpp
+++ b/source/Core/EmulateInstruction.cpp
@@ -69,8 +69,8 @@ EmulateInstruction::EmulateInstruction
     m_write_mem_callback (write_mem_callback),
     m_read_reg_callback (read_reg_callback),
     m_write_reg_callback (write_reg_callback),
-    m_opcode (),
     m_opcode_pc (LLDB_INVALID_ADDRESS),
+    m_opcode (),
     m_advance_pc (false)
 {
 }
diff --git a/source/Core/ValueObject.cpp b/source/Core/ValueObject.cpp
index 78e0cfc..eeb3ac0 100644
--- a/source/Core/ValueObject.cpp
+++ b/source/Core/ValueObject.cpp
@@ -48,6 +48,7 @@ static lldb::user_id_t g_value_obj_uid = 0;
 ValueObject::ValueObject (ValueObject &parent) :
     UserID (++g_value_obj_uid), // Unique identifier for every value object
     m_parent (&parent),
+    m_update_point (parent.GetUpdatePoint ()),
     m_name (),
     m_data (),
     m_value (),
@@ -66,8 +67,7 @@ ValueObject::ValueObject (ValueObject &parent) :
     m_children_count_valid (false),
     m_old_value_valid (false),
     m_pointers_point_to_load_addrs (false),
-    m_is_deref_of_parent (false),
-    m_update_point (parent.GetUpdatePoint ())
+    m_is_deref_of_parent (false)
 {
 }
 
@@ -77,6 +77,7 @@ ValueObject::ValueObject (ValueObject &parent) :
 ValueObject::ValueObject (ExecutionContextScope *exe_scope) :
     UserID (++g_value_obj_uid), // Unique identifier for every value object
     m_parent (NULL),
+    m_update_point (exe_scope),
     m_name (),
     m_data (),
     m_value (),
@@ -95,8 +96,7 @@ ValueObject::ValueObject (ExecutionContextScope *exe_scope) :
     m_children_count_valid (false),
     m_old_value_valid (false),
     m_pointers_point_to_load_addrs (false),
-    m_is_deref_of_parent (false),
-    m_update_point (exe_scope)
+    m_is_deref_of_parent (false)
 {
 }
 
@@ -1410,16 +1410,17 @@ ValueObject::AddressOf (Error &error)
 }
 
 ValueObject::EvaluationPoint::EvaluationPoint () :
-    m_stop_id (0),
-    m_thread_id (LLDB_INVALID_UID)  
+    m_thread_id (LLDB_INVALID_UID),
+    m_stop_id (0)
 {
 }
 
 ValueObject::EvaluationPoint::EvaluationPoint (ExecutionContextScope *exe_scope, bool use_selected):
-    m_stop_id (0),
-    m_thread_id (LLDB_INVALID_UID),
     m_needs_update (true),
-    m_first_update (true)
+    m_first_update (true),
+    m_thread_id (LLDB_INVALID_UID),
+    m_stop_id (0)
+    
 {
     ExecutionContext exe_ctx;
     ExecutionContextScope *computed_exe_scope = exe_scope;  // If use_selected is true, we may find a better scope,
@@ -1477,12 +1478,12 @@ ValueObject::EvaluationPoint::EvaluationPoint (ExecutionContextScope *exe_scope,
 
 ValueObject::EvaluationPoint::EvaluationPoint (const ValueObject::EvaluationPoint &rhs) :
     m_exe_scope (rhs.m_exe_scope),
+    m_needs_update(true),
+    m_first_update(true),
     m_target_sp (rhs.m_target_sp),
     m_process_sp (rhs.m_process_sp),
     m_thread_id (rhs.m_thread_id),
     m_stack_id (rhs.m_stack_id),
-    m_needs_update(true),
-    m_first_update(true),
     m_stop_id (0)
 {
 }
diff --git a/source/Expression/ASTStructExtractor.cpp b/source/Expression/ASTStructExtractor.cpp
index 0375a97..efad383 100644
--- a/source/Expression/ASTStructExtractor.cpp
+++ b/source/Expression/ASTStructExtractor.cpp
@@ -34,8 +34,8 @@ ASTStructExtractor::ASTStructExtractor(ASTConsumer *passthrough,
     m_passthrough_sema (NULL),
     m_sema (NULL),
     m_action (NULL),
-    m_struct_name (struct_name),
-    m_function (function)
+    m_function (function),
+    m_struct_name (struct_name)
 {
     if (!m_passthrough)
         return;
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 411651f..99f0e60 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -50,9 +50,9 @@ using namespace clang;
 ClangExpressionDeclMap::ClangExpressionDeclMap (bool keep_result_in_memory) :
     m_found_entities (),
     m_struct_members (),
+    m_keep_result_in_memory (keep_result_in_memory),
     m_parser_vars (),
-    m_struct_vars (),
-    m_keep_result_in_memory (keep_result_in_memory)
+    m_struct_vars ()
 {
     EnableStructVars();
 }
diff --git a/source/Expression/ClangExpressionVariable.cpp b/source/Expression/ClangExpressionVariable.cpp
index 7cb25e3..2725e6c 100644
--- a/source/Expression/ClangExpressionVariable.cpp
+++ b/source/Expression/ClangExpressionVariable.cpp
@@ -28,16 +28,16 @@ using namespace clang;
 ClangExpressionVariable::ClangExpressionVariable(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) :
     m_parser_vars(),
     m_jit_vars (),
-    m_frozen_sp (new ValueObjectConstResult(exe_scope, byte_order, addr_byte_size)),
-    m_flags (EVNone)
+    m_flags (EVNone),
+    m_frozen_sp (new ValueObjectConstResult(exe_scope, byte_order, addr_byte_size))
 {
 }
 
 ClangExpressionVariable::ClangExpressionVariable (const lldb::ValueObjectSP &valobj_sp) :
     m_parser_vars(),
     m_jit_vars (),
-    m_frozen_sp (valobj_sp),
-    m_flags (EVNone)
+    m_flags (EVNone),
+    m_frozen_sp (valobj_sp)
 {
 }
 
diff --git a/source/Expression/ClangUserExpression.cpp b/source/Expression/ClangUserExpression.cpp
index d560e0f..c86a771 100644
--- a/source/Expression/ClangUserExpression.cpp
+++ b/source/Expression/ClangUserExpression.cpp
@@ -45,11 +45,11 @@ ClangUserExpression::ClangUserExpression (const char *expr,
     m_expr_text (expr),
     m_expr_prefix (expr_prefix ? expr_prefix : ""),
     m_transformed_text (),
+    m_desired_type (NULL, NULL),
     m_cplusplus (false),
     m_objectivec (false),
     m_needs_object_ptr (false),
-    m_const_object (false),
-    m_desired_type (NULL, NULL)
+    m_const_object (false)
 {
 }
 
diff --git a/source/Expression/IRDynamicChecks.cpp b/source/Expression/IRDynamicChecks.cpp
index e0284c7..a84fe8e 100644
--- a/source/Expression/IRDynamicChecks.cpp
+++ b/source/Expression/IRDynamicChecks.cpp
@@ -462,8 +462,8 @@ private:
 IRDynamicChecks::IRDynamicChecks(DynamicCheckerFunctions &checker_functions,
                                  const char *func_name) :
     ModulePass(ID),
-    m_checker_functions(checker_functions),
-    m_func_name(func_name)
+    m_func_name(func_name),
+    m_checker_functions(checker_functions)
 {
 }
 
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index f9ea7e1..a6d1651 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -38,15 +38,15 @@ IRForTarget::IRForTarget (lldb_private::ClangExpressionDeclMap *decl_map,
                           lldb_private::Stream *error_stream,
                           const char *func_name) :
     ModulePass(ID),
+    m_resolve_vars(resolve_vars),
+    m_func_name(func_name),
     m_decl_map(decl_map),
     m_CFStringCreateWithBytes(NULL),
     m_sel_registerName(NULL),
-    m_func_name(func_name),
-    m_resolve_vars(resolve_vars),
     m_const_result(const_result),
+    m_error_stream(error_stream),
     m_has_side_effects(false),
-    m_result_is_pointer(false),
-    m_error_stream(error_stream)
+    m_result_is_pointer(false)
 {
 }
 
diff --git a/source/Expression/IRToDWARF.cpp b/source/Expression/IRToDWARF.cpp
index 88d880b..289d617 100644
--- a/source/Expression/IRToDWARF.cpp
+++ b/source/Expression/IRToDWARF.cpp
@@ -31,10 +31,10 @@ IRToDWARF::IRToDWARF(lldb_private::ClangExpressionVariableList &local_vars,
                      lldb_private::StreamString &strm,
                      const char *func_name) :
     ModulePass(ID),
+    m_func_name(func_name),
     m_local_vars(local_vars),
     m_decl_map(decl_map),
-    m_strm(strm),
-    m_func_name(func_name)
+    m_strm(strm)
 {
 }
 
diff --git a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 0f3207b..077aa4d 100644
--- a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -40,20 +40,20 @@ RegisterContextLLDB::RegisterContextLLDB
 ) :
     RegisterContext (thread, frame_number), 
     m_thread(thread), 
-    m_next_frame(next_frame), 
-    m_sym_ctx(sym_ctx), 
-    m_all_registers_available(false), 
-    m_registers(),
-    m_cfa (LLDB_INVALID_ADDRESS), 
+    m_next_frame(next_frame),
+    m_fast_unwind_plan_sp (),
+    m_full_unwind_plan_sp (),
+    m_all_registers_available(false),
+    m_frame_type (-1),
+    m_cfa (LLDB_INVALID_ADDRESS),
     m_start_pc (), 
     m_current_pc (), 
-    m_frame_number (frame_number),
-    m_full_unwind_plan_sp (), 
-    m_fast_unwind_plan_sp (), 
-    m_frame_type (-1), 
     m_current_offset (0), 
-    m_current_offset_backed_up_one (0), 
-    m_sym_ctx_valid (false)
+    m_current_offset_backed_up_one (0),
+    m_sym_ctx(sym_ctx),
+    m_sym_ctx_valid (false),
+    m_frame_number (frame_number),
+    m_registers()
 {
     m_sym_ctx.Clear();
     m_sym_ctx_valid = false;
diff --git a/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp b/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
index 83255e2..855aa69 100644
--- a/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
+++ b/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
@@ -167,10 +167,10 @@ private:
 };
 
 AssemblyParse_x86::AssemblyParse_x86 (Target& target, Thread* thread, int cpu, AddressRange func) :
-                         m_target (target), m_thread (thread), m_cpu(cpu), m_func_bounds(func),
+                         m_target (target), m_thread (thread), m_func_bounds(func), m_cur_insn (),
                          m_machine_ip_regnum (-1), m_machine_sp_regnum (-1), m_machine_fp_regnum (-1),
                          m_lldb_ip_regnum (-1), m_lldb_sp_regnum (-1), m_lldb_fp_regnum (-1),
-                         m_wordsize (-1), m_cur_insn ()
+                         m_wordsize (-1), m_cpu(cpu)
 {
     int *initialized_flag = NULL;
     m_lldb_ip_regnum = m_lldb_sp_regnum = m_lldb_fp_regnum = -1;
diff --git a/source/Symbol/DWARFCallFrameInfo.cpp b/source/Symbol/DWARFCallFrameInfo.cpp
index 3fb84f4..7513d23 100644
--- a/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/source/Symbol/DWARFCallFrameInfo.cpp
@@ -30,13 +30,13 @@ DWARFCallFrameInfo::DWARFCallFrameInfo(ObjectFile& objfile, SectionSP& section,
     m_objfile (objfile),
     m_section (section),
     m_reg_kind (reg_kind),  // The flavor of registers that the CFI data uses (enum RegisterKind)
+    m_flags (),
     m_cie_map (),
     m_cfi_data (),
     m_cfi_data_initialized (false),
     m_fde_index (),
     m_fde_index_initialized (false),
-    m_is_eh_frame (is_eh_frame),
-    m_flags ()
+    m_is_eh_frame (is_eh_frame)
 {
 }
 
diff --git a/source/Symbol/Symbol.cpp b/source/Symbol/Symbol.cpp
index bd8246b..480405e 100644
--- a/source/Symbol/Symbol.cpp
+++ b/source/Symbol/Symbol.cpp
@@ -20,8 +20,8 @@ using namespace lldb_private;
 
 
 Symbol::Symbol() :
-    SymbolContextScope (),
     UserID (),
+    SymbolContextScope (),
     m_mangled (),
     m_type (eSymbolTypeInvalid),
     m_type_data (0),
@@ -53,8 +53,8 @@ Symbol::Symbol
     uint32_t size,
     uint32_t flags
 ) :
-    SymbolContextScope (),
     UserID (symID),
+    SymbolContextScope (),
     m_mangled (name, name_is_mangled),
     m_type (type),
     m_type_data (0),
@@ -84,8 +84,8 @@ Symbol::Symbol
     const AddressRange &range,
     uint32_t flags
 ) :
-    SymbolContextScope (),
     UserID (symID),
+    SymbolContextScope (),
     m_mangled (name, name_is_mangled),
     m_type (type),
     m_type_data (0),
@@ -103,8 +103,8 @@ Symbol::Symbol
 }
 
 Symbol::Symbol(const Symbol& rhs):
-    SymbolContextScope (rhs),
     UserID (rhs),
+    SymbolContextScope (rhs),
     m_mangled (rhs.m_mangled),
     m_type (rhs.m_type),
     m_type_data (rhs.m_type_data),
diff --git a/source/Symbol/Type.cpp b/source/Symbol/Type.cpp
index 379fa20..31fad29 100644
--- a/source/Symbol/Type.cpp
+++ b/source/Symbol/Type.cpp
@@ -63,8 +63,8 @@ Type::Type () :
     m_symbol_file (NULL),
     m_context (NULL),
     m_encoding_type (NULL),
-    m_encoding_uid_type (eEncodingInvalid),
     m_encoding_uid (0),
+    m_encoding_uid_type (eEncodingInvalid),
     m_byte_size (0),
     m_decl (),
     m_clang_type (NULL),
@@ -79,8 +79,8 @@ Type::Type (const Type &rhs) :
     m_symbol_file (rhs.m_symbol_file),
     m_context (rhs.m_context),
     m_encoding_type (rhs.m_encoding_type),
-    m_encoding_uid_type (rhs.m_encoding_uid_type),
     m_encoding_uid (rhs.m_encoding_uid),
+    m_encoding_uid_type (rhs.m_encoding_uid_type),
     m_byte_size (rhs.m_byte_size),
     m_decl (rhs.m_decl),
     m_clang_type (rhs.m_clang_type),
diff --git a/source/Symbol/UnwindTable.cpp b/source/Symbol/UnwindTable.cpp
index 4b30980..d185655 100644
--- a/source/Symbol/UnwindTable.cpp
+++ b/source/Symbol/UnwindTable.cpp
@@ -33,8 +33,8 @@ UnwindTable::UnwindTable (ObjectFile& objfile) :
     m_object_file (objfile), 
     m_unwinds (),
     m_initialized (false),
-    m_eh_frame (NULL),
-    m_assembly_profiler (NULL)
+    m_assembly_profiler (NULL),
+    m_eh_frame (NULL)
 {
 }
 
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index 6ad1799..aef35a8 100644
--- a/source/Target/StackFrameList.cpp
+++ b/source/Target/StackFrameList.cpp
@@ -38,10 +38,10 @@ StackFrameList::StackFrameList
 ) :
     m_thread (thread),
     m_prev_frames_sp (prev_frames_sp),
-    m_show_inlined_frames (show_inline_frames),
     m_mutex (Mutex::eMutexTypeRecursive),
     m_frames (),
-    m_selected_frame_idx (0)
+    m_selected_frame_idx (0),
+    m_show_inlined_frames (show_inline_frames)
 {
 }
 
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 05403f8..2ade9e6 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -1174,10 +1174,10 @@ Target::RunStopHooks ()
 Target::StopHook::StopHook (lldb::TargetSP target_sp, lldb::user_id_t uid) :
         UserID (uid),
         m_target_sp (target_sp),
-        m_active (true),
         m_commands (),
         m_specifier_sp (),
-        m_thread_spec_ap(NULL)
+        m_thread_spec_ap(NULL),
+        m_active (true)
 {
 }
 
@@ -1186,8 +1186,8 @@ Target::StopHook::StopHook (const StopHook &rhs) :
         m_target_sp (rhs.m_target_sp),
         m_commands (rhs.m_commands),
         m_specifier_sp (rhs.m_specifier_sp),
-        m_active (rhs.m_active),
-        m_thread_spec_ap (NULL)
+        m_thread_spec_ap (NULL),
+        m_active (rhs.m_active)
 {
     if (rhs.m_thread_spec_ap.get() != NULL)
         m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get()));
diff --git a/source/Target/ThreadPlanTestCondition.cpp b/source/Target/ThreadPlanTestCondition.cpp
index b2c90db..9facfdc 100644
--- a/source/Target/ThreadPlanTestCondition.cpp
+++ b/source/Target/ThreadPlanTestCondition.cpp
@@ -43,8 +43,8 @@ ThreadPlanTestCondition::ThreadPlanTestCondition (
         lldb::BreakpointLocationSP break_loc_sp, 
         bool stop_others) :
     ThreadPlan (ThreadPlan::eKindTestCondition, "test condition", thread, eVoteNoOpinion, eVoteNoOpinion),
-    m_exe_ctx (exe_ctx),
     m_expression (expression),
+    m_exe_ctx (exe_ctx),
     m_break_loc_sp (break_loc_sp),
     m_did_stop (false),
     m_stop_others (stop_others)
diff --git a/source/Target/ThreadPlanTracer.cpp b/source/Target/ThreadPlanTracer.cpp
index fe95b9a..961c9cd 100644
--- a/source/Target/ThreadPlanTracer.cpp
+++ b/source/Target/ThreadPlanTracer.cpp
@@ -33,17 +33,17 @@ using namespace lldb_private;
 #pragma mark ThreadPlanTracer
 
 ThreadPlanTracer::ThreadPlanTracer (Thread &thread, lldb::StreamSP &stream_sp) :
+    m_thread (thread),
     m_single_step(true),
     m_enabled (false),
-    m_thread (thread),
     m_stream_sp (stream_sp)
 {
 }
 
 ThreadPlanTracer::ThreadPlanTracer (Thread &thread) :
+    m_thread (thread),
     m_single_step(true),
     m_enabled (false),
-    m_thread (thread),
     m_stream_sp ()
 {
 }
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp
index 77c6fc2..e29db66 100644
--- a/tools/driver/Driver.cpp
+++ b/tools/driver/Driver.cpp
@@ -342,8 +342,8 @@ Driver::OptionData::OptionData () :
     m_debug_mode (false),
     m_print_version (false),
     m_print_help (false),
-    m_seen_options(),
-    m_use_external_editor(false)
+    m_use_external_editor(false),
+    m_seen_options()
 {
 }
 
-- 
1.7.1




More information about the lldb-commits mailing list