From 777180a32b61070a10dd330b4f038bf24e916af1 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 28 Jan 2020 23:30:02 +0100 Subject: [ADT] Make StringRef's std::string conversion operator explicit This has the same behavior as converting std::string_view to std::string. This is an expensive conversion, so explicit conversions are helpful for avoiding unneccessary string copies. --- lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp') diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp index 42cca09..f81a7f2 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp @@ -47,7 +47,7 @@ void HandlePacket(MockServer &server, StringRef response) { StringExtractorGDBRemote request; ASSERT_EQ(PacketResult::Success, server.GetPacket(request)); - ASSERT_THAT(request.GetStringRef(), expected); + ASSERT_THAT(std::string(request.GetStringRef()), expected); ASSERT_EQ(PacketResult::Success, server.SendPacket(response)); } -- cgit v1.1