From ea6b95dc2f68e7f3f06abc47fae44c91ceebef93 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 25 Feb 2020 09:11:13 +0100 Subject: [PATCH] [lldb][NFC] Make ArrayRef initialization more obvious in lldb-test.cpp Seems like this code raised some alarm bells as it looks like an ArrayRef to a temporary initializer list, but it's actually just calling the ArrayRef(T*, T*) constructor. Let's clarify this and directly call the right ArrayRef constructor here. Fixes rdar://problem/59176052 --- lldb/tools/lldb-test/lldb-test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/tools/lldb-test/lldb-test.cpp b/lldb/tools/lldb-test/lldb-test.cpp index 2e2310a94c74..ef6053297328 100644 --- a/lldb/tools/lldb-test/lldb-test.cpp +++ b/lldb/tools/lldb-test/lldb-test.cpp @@ -846,7 +846,7 @@ static void dumpSectionList(LinePrinter &Printer, const SectionList &List, bool if (opts::object::SectionContents) { lldb_private::DataExtractor Data; S->GetSectionData(Data); - ArrayRef Bytes = {Data.GetDataStart(), Data.GetDataEnd()}; + ArrayRef Bytes(Data.GetDataStart(), Data.GetDataEnd()); Printer.formatBinary("Data: ", Bytes, 0); }