[Lldb-commits] [PATCH] D58167: Refactor user/group name resolving code
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 13 11:20:55 PST 2019
jingham added a comment.
You are using a mix of llvm & lldb naming conventions for local variables and arguments and the ivars of UserIDResolver (lots of "Uid", etc...) Probably better to stick with the lldb convention.
Other than that it looks good to me.
================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp:439
if (uid != UINT32_MAX) {
- std::string name;
- if (HostInfo::LookupUserName(uid, name)) {
+ if (auto name = HostInfo::GetUserIDResolver().GetUserName(uid)) {
StreamString response;
----------------
Do we need auto here? Since we have a bunch of API's returning StringRef's now when I see strings returned I get paranoid about their lifespan. auto hides the fact that I don't need to worry...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58167/new/
https://reviews.llvm.org/D58167
More information about the lldb-commits
mailing list