[Lldb-commits] [lldb] 31cf581 - [lldb] Explicitly qualify calls to std::static_pointer_cast

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 6 10:55:24 PST 2020


Author: Pavel Labath
Date: 2020-02-06T10:55:16-08:00
New Revision: 31cf5819987a0b052338d7a6f41cbad5ba224b36

URL: https://github.com/llvm/llvm-project/commit/31cf5819987a0b052338d7a6f41cbad5ba224b36
DIFF: https://github.com/llvm/llvm-project/commit/31cf5819987a0b052338d7a6f41cbad5ba224b36.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/include/lldb/Interpreter/CommandReturnObject.h
    lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Removed: 
    


################################################################################
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 @@ class CommandReturnObject {
   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) {


        


More information about the lldb-commits mailing list