DavidSpickett added inline comments.
================ Comment at: lldb/source/Commands/CommandObjectMemory.cpp:1701 } else { if (command.GetArgumentCount() == 1) { auto load_addr_str = command[0].ref(); ---------------- stella.stamenova wrote: > Actually, I would change the logic here a little bit to make it easier to > read. Right now it is: > > ``` > if (argc > 1 || ... ) { > } else { > if (GetArgumentCount() == 1) { > } > ... > } > ``` > > It should be: > > ``` > if (argc > 1 || ... ) { > } else if (argc == 1) { //since argc already has the value of > GetArgumentCount() > } > > if (result.Succeeded()) { > ... > } > ``` > > This will make the function more readable, fixing the bug that you found, > preserving most of its logic and keeping the single return. > You're the second person to bring this up, so I've converted the logic to return early. (I know that's more than you asked but I think it helps overall) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88229/new/ https://reviews.llvm.org/D88229 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits