[PATCH] D85826: [clang] Make signature help work with dependent args

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 09:59:56 PDT 2020


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



More information about the cfe-commits mailing list