[Lldb-commits] [PATCH] D51175: Add support for descriptions with command completions.
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 13 10:26:08 PDT 2018
jingham accepted this revision.
jingham added inline comments.
This revision is now accepted and ready to land.
Comment at: source/Utility/CompletionRequest.cpp:79
+ // Add the completion if we haven't seen the same value before.
+ if (m_added_values.insert(r.GetUniqueKey()).second)
> jingham wrote:
> > JDevlieghere wrote:
> > > Do you think there's any value in in checking the description? For example, if the description was empty for the existing value but a description is provided for the duplicate?
> > This seems reasonable. For instance, for process attach we might want to do something like:
> > (lldb) process attach -n Foo<TAB>
> > Foo - pid 123
> > Foo - pid 234
> > FooBar - pid 345
> > But then the two Foo's would have the same unique key and you would only print one.
> Also, when providing for example completions for the expression command, we would have the same function name with different argument lists. E.g.
> foo( -- int foo(int, int)
> foo( -- int foo(double, double)
I just missed that after adding the number of the completion, you then append the description to make the key. My bad.
More information about the lldb-commits