Author: Shivam Gupta Date: 2024-06-17T09:56:01+05:30 New Revision: e4e350e85b377e424299d26937cc60ea6868900c
URL: https://github.com/llvm/llvm-project/commit/e4e350e85b377e424299d26937cc60ea6868900c DIFF: https://github.com/llvm/llvm-project/commit/e4e350e85b377e424299d26937cc60ea6868900c.diff LOG: [LLDB] Remove dead code (NFC) (#95713) The dead code is caught by PVS studio analyzer - https://pvs-studio.com/en/blog/posts/cpp/1126/, fragment N12. Warning message - V523 The 'then' statement is equivalent to the 'else' statement. Options.cpp 1212 Added: Modified: lldb/source/Interpreter/Options.cpp Removed: ################################################################################ diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp index 4e7d074ace1b8..c5e75e0b9dced 100644 --- a/lldb/source/Interpreter/Options.cpp +++ b/lldb/source/Interpreter/Options.cpp @@ -1197,21 +1197,12 @@ OptionElementVector Options::ParseForCompletion(const Args &args, } break; case OptionParser::eOptionalArgument: - if (OptionParser::GetOptionArgument() != nullptr) { - option_element_vector.push_back(OptionArgElement( - opt_defs_index, - FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 2], - args), - FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 1], - args))); - } else { - option_element_vector.push_back(OptionArgElement( - opt_defs_index, - FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 2], - args), - FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 1], - args))); - } + option_element_vector.push_back(OptionArgElement( + opt_defs_index, + FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 2], + args), + FindOriginalIndex(dummy_vec[OptionParser::GetOptionIndex() - 1], + args))); break; default: // The options table is messed up. Here we'll just continue _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits