From: Jonas Devlieghere Date: Tue, 21 Jul 2020 16:49:12 +0000 (-0700) Subject: [lldb] Change the CommandArgumentData ctor (NFC) X-Git-Tag: llvmorg-13-init~17274 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98efa3d57f0a38c9cd5433640a9abe6e7d9b7513;p=platform%2Fupstream%2Fllvm.git [lldb] Change the CommandArgumentData ctor (NFC) By using default arguments the caller can specify a subset without the need for overloads. This is particularly useful in combination with emplace_back as these objects are generally stored in a vector. --- diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h index cc4d40b..b927c7e 100644 --- a/lldb/include/lldb/Interpreter/CommandObject.h +++ b/lldb/include/lldb/Interpreter/CommandObject.h @@ -90,14 +90,13 @@ public: { lldb::CommandArgumentType arg_type; ArgumentRepetitionType arg_repetition; - uint32_t arg_opt_set_association; // This arg might be associated only with - // some particular option set(s). - CommandArgumentData() - : arg_type(lldb::eArgTypeNone), arg_repetition(eArgRepeatPlain), - arg_opt_set_association(LLDB_OPT_SET_ALL) // By default, the arg - // associates to all option - // sets. - {} + /// This arg might be associated only with some particular option set(s). By + /// default the arg associates to all option sets. + uint32_t arg_opt_set_association; + + CommandArgumentData(lldb::CommandArgumentType type = lldb::eArgTypeNone, + ArgumentRepetitionType repetition = eArgRepeatPlain, + uint32_t opt_set = LLDB_OPT_SET_ALL) {} }; typedef std::vector