[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 03:02:36 PDT 2024
================
@@ -2186,6 +2197,45 @@ AddOrdinaryNameResults(SemaCodeCompletion::ParserCompletionContext CCC,
} else {
Results.AddResult(Result("template", CodeCompletionResult::RK_Keyword));
}
+
+ if (SemaRef.getLangOpts().CPlusPlus20 &&
+ SemaRef.getLangOpts().CPlusPlusModules) {
+ // export
+ Results.AddResult(Result("export", CodeCompletionResult::RK_Keyword));
+
+ if (SemaRef.CurContext->isTranslationUnit()) {
----------------
cor3ntin wrote:
Well, exactly.
If we haven't see `module;`, we should propose `module;` and `export module`
If we have seen `module;` - we should not propose it again
If we have seem `export module`, we should not propose `import`
https://github.com/llvm/llvm-project/pull/107982
More information about the cfe-commits
mailing list