Currently, clangd always completes typename as typename qualifier::name, I think the current behavior is not useful when the code completion is triggered in template <>. So I tweak it to typename identifier.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, as previous version only saves a single character, i.e. pressing a single tab after qualifier vs hitting : twice, while it is annoying for the non-qualified case, now you need to delete the rest.
let me know if I should land this for you.
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
1693 | nit: let's use name instead of identifier |
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
2058 | unfortunately the reasoning above doesn't apply here, as a using declaration *must* have a nested-name-specifier. e.g. using X; is not allowed. so please revert this (and following on using typename it requires a nested-name-specifier too) |
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
2058 | Yes, you are right. but I think complete using as using qualifier::name is not useful when user want input something like using A = B. |
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
2058 | I think we just need revert change for using typename qualifier::name. WDYT. |
clang/lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
2058 | right but using declarations vs aliases are two different use cases, I would suggest adding a separate completion item for that in form: using $alias$ = $type$; |
nit: let's use name instead of identifier