================ @@ -81,6 +81,39 @@ class StructuredDataImpl { void SetObjectSP(const StructuredData::ObjectSP &obj) { m_data_sp = obj; } + void SetValueForKey(const char *key, + const StructuredData::ObjectSP &value) const { + if (m_data_sp) { + auto dict = m_data_sp->GetAsDictionary(); + if (dict) + return dict->AddItem(key, value); ---------------- JDevlieghere wrote:
The type isn't obvious form the RHS so this shouldn't use `auto`. ```suggestion if (auto dict = m_data_sp->GetAsDictionary()) return dict->AddItem(key, value); ``` https://github.com/llvm/llvm-project/pull/154445 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits