[Lldb-commits] [PATCH] D12796: [lldb-mi] No need to call Format with no varargs.

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 11 03:35:19 PDT 2015


brucem created this revision.
brucem added reviewers: abidh, ki.stfu.
brucem added a subscriber: lldb-commits.

There's no need to call CMIUtilString::Format
with a string and no args.

http://reviews.llvm.org/D12796

Files:
  tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
  tools/lldb-mi/MIDriverMgr.cpp

Index: tools/lldb-mi/MIDriverMgr.cpp
===================================================================
--- tools/lldb-mi/MIDriverMgr.cpp
+++ tools/lldb-mi/MIDriverMgr.cpp
@@ -300,7 +300,7 @@
     }
     else
     {
-        const CMIUtilString errMsg(CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET)));
+        const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
         CMICmnStreamStdout::Instance().Write(errMsg, true);
         return MIstatus::failure;
     }
@@ -327,7 +327,7 @@
 {
     if (m_pDriverCurrent == nullptr)
     {
-        const CMIUtilString errMsg(CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET)));
+        const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
         CMICmnStreamStdout::Instance().Write(errMsg, true);
         return MIstatus::failure;
     }
@@ -363,7 +363,7 @@
         return m_pDriverCurrent->GetError();
     else
     {
-        const CMIUtilString errMsg(CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET)));
+        const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
         CMICmnStreamStdout::Instance().Write(errMsg, true);
     }
 
@@ -385,7 +385,7 @@
         return m_pDriverCurrent->GetName();
     else
     {
-        const CMIUtilString errMsg(CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET)));
+        const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
         CMICmnStreamStdout::Instance().Write(errMsg, true);
     }
 
@@ -408,7 +408,7 @@
         pDebugger = &m_pDriverCurrent->GetTheDebugger();
     else
     {
-        const CMIUtilString errMsg(CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET)));
+        const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
         CMICmnStreamStdout::Instance().Write(errMsg, true);
     }
 
Index: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
@@ -106,7 +106,7 @@
     bOk = SharedDataDestroy();
     if (!bOk)
     {
-        errMsg = CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE));
+        errMsg = MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE);
         errMsg += "\n";
     }
     m_vecActiveThreadId.clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12796.34537.patch
Type: text/x-patch
Size: 2356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150911/80b59221/attachment-0001.bin>


More information about the lldb-commits mailing list