aprantl added a comment.

Ok, then let's continue this way.



================
Comment at: tools/lldb-mi/MICmdBase.h:89
+                      [] { return MIstatus::failure; },
+                      const lldb::SBError error = lldb::SBError());
   template <class T> T *GetOption(const CMIUtilString &vStrOptionName);
----------------
If you move the error argument to the front, you can use the default error 
handler in the function below. In fact, I'm not even sure what it would mean to 
call this function without an error. I guess the error argument should probably 
not have a default value at all.


================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:242
       const CMIUtilString 
&rErrMsg(CMIDriver::Instance().GetErrorDescription());
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_SET_NEW_DRIVER_STATE),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     rErrMsg.c_str()));
+      this->SetError(CMIUtilString::Format(
+          MIRSRC(IDS_CMD_ERR_SET_NEW_DRIVER_STATE),
----------------
If you add a second variant (or a wrapper) that takes a bool instead of an 
SBError, you could use that one here, since it's basically the same pattern, 
just not with an SBError.


https://reviews.llvm.org/D48295



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to