[Lldb-commits] [lldb] r246597 - std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 1 15:24:35 PDT 2015


Author: enrico
Date: Tue Sep  1 17:24:35 2015
New Revision: 246597

URL: http://llvm.org/viewvc/llvm-project?rev=246597&view=rev
Log:
std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage


Modified:
    lldb/trunk/source/DataFormatters/FormatManager.cpp

Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=246597&r1=246596&r2=246597&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Tue Sep  1 17:24:35 2015
@@ -636,7 +636,7 @@ FormatManager::GetTypeForCache (ValueObj
     return ConstString();
 }
 
-static std::initializer_list<lldb::LanguageType>
+static std::vector<lldb::LanguageType>
 GetCandidateLanguages (ValueObject& valobj)
 {
     lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage();




More information about the lldb-commits mailing list