diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2023-05-02 10:31:21 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2023-05-02 10:36:11 -0700 |
commit | 611bd6c6aeb9a9d194aa128e2d20b4b6bbb1fc84 (patch) | |
tree | 218426d304413434545c65deabd863b04bb2dbce /lldb/unittests | |
parent | 7f8dee5c540465b4eb487a3e555c89227ec33d76 (diff) | |
download | llvm-611bd6c6aeb9a9d194aa128e2d20b4b6bbb1fc84.tar.gz |
[lldb] Make exe_ctx an optional argument in OptionValueProperties (NFC)
The majority of call sites are nullptr as the execution context.
Refactor OptionValueProperties to make the argument optional and
simplify all the callers.
Diffstat (limited to 'lldb/unittests')
-rw-r--r-- | lldb/unittests/Interpreter/TestOptionValue.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/unittests/Interpreter/TestOptionValue.cpp b/lldb/unittests/Interpreter/TestOptionValue.cpp index 30687d6a6ede..64adcff243fd 100644 --- a/lldb/unittests/Interpreter/TestOptionValue.cpp +++ b/lldb/unittests/Interpreter/TestOptionValue.cpp @@ -16,6 +16,7 @@ class Callback { public: virtual void Invoke() const {} void operator()() const { Invoke(); } + protected: ~Callback() = default; }; @@ -101,12 +102,11 @@ public: } OptionValueDictionary *GetDictionary() { - return GetPropertyAtIndexAsOptionValueDictionary(nullptr, m_dict_index); + return GetPropertyAtIndexAsOptionValueDictionary(m_dict_index); } OptionValueFileSpecList *GetFileList() { - return GetPropertyAtIndexAsOptionValueFileSpecList(nullptr, - m_file_list_index); + return GetPropertyAtIndexAsOptionValueFileSpecList(m_file_list_index); } private: @@ -170,5 +170,6 @@ TEST(TestProperties, DeepCopy) { dict_copy_ptr->SetValueFromString("C=3", eVarSetOperationAppend); // Trigger the callback second time. - file_list_copy_ptr->SetValueFromString("0 another/path", eVarSetOperationReplace); + file_list_copy_ptr->SetValueFromString("0 another/path", + eVarSetOperationReplace); } |