kadircet added inline comments.
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:5573
+ // performing any semantic checks on availability. That's to improve user
+ // experience, it is better to see all overloads rather than none.
+ if (Expr::hasAnyTypeDependentArguments(Args)) {
----------------
hokein wrote:
> I'm a bit nervous to show all overloads regardlessly, I think we could do
> some smarter things like
>
> 1. if there are some prefix non-type-dependent arguments, we could use these
> type information to filter out some unrelated candidates;
> 2. different overloads may have different number of parameters, this is an
> important signal, e.g. `foo(t, ^t)` should not give `void foo(int)` result;
>
> 2 seems quite critical and trivial to implement, maybe we can do it in this
> patch.
> if there are some prefix non-type-dependent arguments, we could use these
> type information to filter out some unrelated candidates;
well actually now that I think about it, this is actually not that hard.
possibly even easier than current version. changing the logic surface every
candidate using the prefix, and do a post-filtering instead of trying to mock
all the results.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85826/new/
https://reviews.llvm.org/D85826
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits