[Lldb-commits] [lldb] [lldb][NFCI] Minor refactor to CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 29 16:50:09 PST 2024


================
@@ -1591,24 +1591,24 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
 
   Options *GetOptions() override { return &m_options; }
 
-  bool VerifyCommandOptionValue(const std::string &option, int &real_value) {
-    bool okay = true;
+  std::optional<bool> VerifyCommandOptionValue(const std::string &option) {
----------------
clayborg wrote:

We should modify `OptionArgParser::ToBoolean(...)` to return a `std::optional<bool>`. it already handles "0" and "1" strings correctly, so this integer conversion stuff is just not doing anything useful

https://github.com/llvm/llvm-project/pull/79901


More information about the lldb-commits mailing list