[Lldb-commits] [PATCH] D30789: Make file and directory name completion work properly on Windows.

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 10 09:18:18 PST 2017

zturner added inline comments.

Comment at: lldb/source/Commands/CommandCompletions.cpp:112
+  if (!Resolver)
+    Resolver = &SR;
labath wrote:
> amccarth wrote:
> > This leaves the caller with no way to say the don't want a tilde resolver.  I didn't expect that from reading the API.  Perhaps a comment on the API could clarify that you're going to get this default behavior if you specify nullptr.
> I agree with Adrian.
> What do you think about an API like:
> `DiskFilesOrDirectories(..., const TildeExpressionResolver &Resolver = StandardTildeExpressionResolver())` ?
I don't actually think there *should* be a way to specify no resolver.  That sounds like YAGNI.  The only real use cases are "Do it for real" or "do it with a mock implementation".  I've updated this to take a reference, which should indicate that it is required, and now the version that delegates to this function allocates a real instance in its own stack frame and passes it in.  Hopefully this makes things more clear.


More information about the lldb-commits mailing list