[clang] [clang-tools-extra] Add code completion for C++20 keywords. (PR #107982)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 02:51:55 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));
+    }
----------------
16bit-ykiko wrote:

Resolve.

https://github.com/llvm/llvm-project/pull/107982


More information about the cfe-commits mailing list