================ @@ -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()) { ---------------- 16bit-ykiko wrote:
I push a new commit and try to make completion for module related keywords more context-sensitive. And found something strange: https://godbolt.org/z/YM9dhEKKe ```cpp module; export module M; ^ ``` If I try to run code completion at `^`, only get a compiler error. ``` <source>:3:1: error: export declaration can only be used within a module purview 3 | export mo<U+0000>dule M; ``` The error shouldn't occur, right? https://github.com/llvm/llvm-project/pull/107982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits