[PATCH] D76770: [CodeComplete] Don't replace the rest of line in #include completion.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 10:16:19 PDT 2020


sammccall added a comment.

Does this regress the case where you complete a file rather than a directory?
e.g. `#include "foo/^one.h"`
If you select "two.h", then we definitely want to replace "one.h", right?

The root here is that we have to decide what to replace independently of the completion item.
One compromise might be to replace up to the quote, but if you're completing `"foo/^one.h"` and `bar` is a directory, check if `foo/bar/one.h` exists and offer it as a completion. Seems complicated though.

Or we can take the tradeoff here if it's better but it'd be good to understand why.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76770/new/

https://reviews.llvm.org/D76770





More information about the cfe-commits mailing list