[all-commits] [llvm/llvm-project] ec4c47: Add code completion for C++20 keywords. (#107982)
ykiko via All-commits
all-commits at lists.llvm.org
Tue Nov 26 04:04:02 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ec4c47d9490c90a98f2dda3fc9ff7c51782678f8
https://github.com/llvm/llvm-project/commit/ec4c47d9490c90a98f2dda3fc9ff7c51782678f8
Author: ykiko <ykikoykikoykiko at gmail.com>
Date: 2024-11-26 (Tue, 26 Nov 2024)
Changed paths:
M clang-tools-extra/docs/ReleaseNotes.rst
M clang/lib/Parse/ParseDeclCXX.cpp
M clang/lib/Sema/SemaCodeComplete.cpp
A clang/test/CodeCompletion/keywords-cxx20.cpp
Log Message:
-----------
Add code completion for C++20 keywords. (#107982)
This commit adds code completion for C++20 keywords, fix
https://github.com/llvm/llvm-project/issues/107868.
1. complete `concept` in template context
- [x] `template<typename T> conce^` -> `concept`
- [ ] `conce^`
2. complete `requires`
- [x] constraints in template context: `template<typename T> requi^` ->
`requires`
- [x] requires expression: `int x = requ^` -> `requires (parameters) {
requirements }`
- [x] nested requirement: `requires { requ^ }` -> `requires expression
;`
3. complete coroutine keywords
- [x] `co_await^` in expression: `co_aw^` -> `co_await expression;`
- [x] `co_yield` in function body: `co_yi^` -> `co_yield expression;`
- [x] `co_return` in function body: `co_re^` -> `co_return expression;`
4. specifiers: `char8_t`, `consteval`, `constinit`
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list