hokein added a comment.

In D58341#1401212 <https://reviews.llvm.org/D58341#1401212>, @ilya-biryukov 
wrote:

> For context: @hokein mentioned problems in the clangd's code completion if we 
> would index these symbols.
>  This patch in itself does not hurt much, users of the indexing API can 
> decide how to deal with `UsingDecl` on their own, clangd is just one of the 
> clients.
>
> >   I wonder how does merge work with Sema results? See the case below, IIUC 
> > our indexer has one symbol for this using decl, but the code completion 
> > result from Sema contains two symbols. The symbol ids of these 3 symbols 
> > are different, so we will end up with 3 completion results.
>
> That's true, but we're not sure how much this would hurt in practice. 
> Currently we don't show any results from dynamic index for `std::strcmp`, 
> which is arguably worse than showing an extra completion item for the using.


std::strcmp is a fair case here. Sema seems not returning using-decls as part 
of code completion results, it this an intended behavior? Is it possible for us 
to extend Sema to support it?

If we decide to provide using-decl results from index, I think we should make 
sure the code completion information (e.g. signature) is correct.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D58341



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to