labath accepted this revision. labath added inline comments. This revision is now accepted and ready to land.
================ Comment at: lldb/source/Host/common/Socket.cpp:305 - port_str.clear(); - if (to_integer(host_and_port, port, 10) && port < UINT16_MAX) { - port_str = std::string(host_and_port); ---------------- Actually, `to_integer` is already an llvm API (accessed via ADL here :P), and overall I'd prefer to standardize on that, as the most common error with `getAsInteger` is to get the return value backwards. (to_integer will also do an implicit StringRef conversion, so you can call it on a std::string without manual casts). ================ Comment at: lldb/tools/lldb-server/Acceptor.cpp:101-103 + if (llvm::Error decode_error = Socket::DecodeHostAndPort(name, host_str, port_str, port)) + llvm::consumeError(std::move(decode_error)); + else ---------------- `if (!errorToBool(Socket::DecodeHostAndPort(...)))` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110391/new/ https://reviews.llvm.org/D110391 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits