mgorny marked 2 inline comments as done. mgorny added inline comments.
================ Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:375 + + for (auto x : server_features) { + if (x == "qXfer:auxv:read+") ---------------- labath wrote: > mgorny wrote: > > labath wrote: > > > not a big deal, but this probably shouldn't be auto. > > Could you explain a bit? I thought `auto` is convenient here since the > > actual type is visible three lines higher. > Well.. my reasoning was something like this: > - llvm guidelines say that auto should be used (only?) when the type is > obvious from context > - "context" is not exactly specified, but I would take that to mean the > enclosing expression/statement (not the statement two lines up). The use of > `cast<Foo>` in the example supports this. > - the actual type is not that complicated (llvm::StringRef), so it e.g. won't > cause the line to be split in two > - given the above, and the generally cautious approach to auto in llvm, its > better to err on the side of spelling out the type > > But like I said, it's not a big deal... Yeah, this makes sense. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100146/new/ https://reviews.llvm.org/D100146 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits