std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage
llvm-svn: 246597
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 5c39b2a..3313dcc 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -636,7 +636,7 @@
return ConstString();
}
-static std::initializer_list<lldb::LanguageType>
+static std::vector<lldb::LanguageType>
GetCandidateLanguages (ValueObject& valobj)
{
lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage();