From 31cf5819987a0b052338d7a6f41cbad5ba224b36 Mon Sep 17 00:00:00 2001 From: Pavel Labath <labath@google.com> Date: Thu, 6 Feb 2020 10:53:34 -0800 Subject: [PATCH] [lldb] Explicitly qualify calls to std::static_pointer_cast Due to a c++ quirk, these are found through ADL only when a function with that name is found through regular lookup. We have one such function in SharingPtr.h, but I am trying to remove it. --- lldb/include/lldb/Interpreter/CommandReturnObject.h | 4 ++-- .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 2 +- .../Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lldb/include/lldb/Interpreter/CommandReturnObject.h b/lldb/include/lldb/Interpreter/CommandReturnObject.h index 8af76e07e5ae..304e44af0073 100644 --- a/lldb/include/lldb/Interpreter/CommandReturnObject.h +++ b/lldb/include/lldb/Interpreter/CommandReturnObject.h @@ -30,14 +30,14 @@ public: llvm::StringRef GetOutputData() { lldb::StreamSP stream_sp(m_out_stream.GetStreamAtIndex(eStreamStringIndex)); if (stream_sp) - return static_pointer_cast<StreamString>(stream_sp)->GetString(); + return std::static_pointer_cast<StreamString>(stream_sp)->GetString(); return llvm::StringRef(); } llvm::StringRef GetErrorData() { lldb::StreamSP stream_sp(m_err_stream.GetStreamAtIndex(eStreamStringIndex)); if (stream_sp) - return static_pointer_cast<StreamString>(stream_sp)->GetString(); + return std::static_pointer_cast<StreamString>(stream_sp)->GetString(); return llvm::StringRef(); } diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 12b05e7c9e4a..83aca6a380d0 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3479,7 +3479,7 @@ GDBRemoteCommunicationClient::SendGetTraceConfigPacket(lldb::user_id_t uid, return error; } else options.setTraceParams( - static_pointer_cast<StructuredData::Dictionary>( + std::static_pointer_cast<StructuredData::Dictionary>( custom_params_sp)); } } else { diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 6a6e0d56c69f..0bdad8b7b482 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1072,7 +1072,7 @@ GDBRemoteCommunicationServerLLGS::Handle_jTraceStart( return SendIllFormedResponse(packet, "jTraceStart: Ill formed packet "); options.setTraceParams( - static_pointer_cast<StructuredData::Dictionary>(custom_params_sp)); + std::static_pointer_cast<StructuredData::Dictionary>(custom_params_sp)); if (buffersize == std::numeric_limits<uint64_t>::max() || type != lldb::TraceType::eTraceTypeProcessorTrace) {