[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 27 07:17:58 PST 2024
================
@@ -904,11 +928,14 @@ bool StartDebuggingRequestHandler::DoExecute(
"startDebugging",
llvm::json::Object{{"request", request},
{"configuration", std::move(*configuration)}},
- [](llvm::Expected<llvm::json::Value> value) {
+ [](auto dap, auto value) {
----------------
labath wrote:
[llvm policy](https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable) is approximately to use `auto` only when the type is obvious from the context. That definitely isn't the case here.
I'm pretty sure this file was written by someone unaware of that policy, but let's not make it worse. And this is definitely making it worse. llvm::Expected can look very similar to std::optional, but it has a very important difference (the error must be checked), so it's very important to make the type obvious.
https://github.com/llvm/llvm-project/pull/116392
More information about the lldb-commits
mailing list