diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-28 23:30:02 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-28 23:47:07 +0100 |
commit | 777180a32b61070a10dd330b4f038bf24e916af1 (patch) | |
tree | 1e1e6fbb33611290af7424c28f42bfb2b64c92c4 /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | |
parent | 076da521f31a48c2154ab9c03c004afaad70a53b (diff) | |
download | llvm-777180a32b61070a10dd330b4f038bf24e916af1.zip llvm-777180a32b61070a10dd330b4f038bf24e916af1.tar.gz llvm-777180a32b61070a10dd330b4f038bf24e916af1.tar.bz2 |
[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.
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |