Details
- Reviewers
hokein - Commits
- rG53c593c2c893: [clang] Make signature help work with dependent args
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks like a nice improvement.
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp | ||
---|---|---|
1212 | These tests are nice. But we're changing Sema in this patch, I think we'd better to have these in clang, /test/CodeCompletion/call.cpp seems to be the place. | |
clang/lib/Sema/SemaCodeComplete.cpp | ||
5582 | possible. | |
5584 | I'm a bit nervous to show all overloads regardlessly, I think we could do some smarter things like
2 seems quite critical and trivial to implement, maybe we can do it in this patch. |
- Add tests into clang-lit
- Make sure current number of args is less than overloads param count.
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
5584 |
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. |
- Change logic to find all signatures without any dependent args and post filter non-viable overloads using the argument counts.
thanks, looks better.
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
5513–5525 | nit: use early return. if (!Candidate.Function) { continue; } ... |
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
5513–5525 | i wanted to do that, but it changes the semantics. as push_back below executes even when Candidate.Function is nullptr :/ |
These tests are nice.
But we're changing Sema in this patch, I think we'd better to have these in clang, /test/CodeCompletion/call.cpp seems to be the place.