[clang] [clang-tools-extra] Add code completion for C++20 keywords. (PR #107982)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 11 01:41:32 PDT 2024
================
@@ -2265,6 +2318,12 @@ AddOrdinaryNameResults(SemaCodeCompletion::ParserCompletionContext CCC,
Results.AddResult(Result("template", CodeCompletionResult::RK_Keyword));
}
+ if (SemaRef.getLangOpts().CPlusPlus20 &&
+ (CCC == SemaCodeCompletion::PCC_Template ||
+ CCC == SemaCodeCompletion::PCC_MemberTemplate)) {
+ Results.AddResult(Result("requires", CCP_Keyword));
+ }
----------------
zyn0217 wrote:
```suggestion
if (SemaRef.getLangOpts().CPlusPlus20 &&
(CCC == SemaCodeCompletion::PCC_Template ||
CCC == SemaCodeCompletion::PCC_MemberTemplate))
Results.AddResult(Result("requires", CCP_Keyword));
```
https://github.com/llvm/llvm-project/pull/107982
More information about the cfe-commits
mailing list