labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
thanks
================
Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:142-143
+ auto method =
+ llvm::StringSwitch<std::function<ConnectionStatus(
+ ConnectionFileDescriptor &, llvm::StringRef, Status *)>>(scheme)
+ .Case("listen", &ConnectionFileDescriptor::SocketListenAndAccept)
----------------
Maybe just drop std::function?
================
Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:164-171
if (error_ptr)
error_ptr->SetErrorStringWithFormat("unsupported connection URL: '%s'",
path.str().c_str());
return eConnectionStatusError;
}
if (error_ptr)
error_ptr->SetErrorString("invalid connect arguments");
----------------
Could you also please convert this to early returns, while you're inside. I
spent 10 minutes looking at this, and I'm still not sure whether the error
strings are correctly related to the individual checks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111321/new/
https://reviews.llvm.org/D111321
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits