[clang-tools-extra] feat: highlight for import, export keyword of CXX Module (PR #204511)

Aleksandr Platonov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 13 23:49:32 PDT 2026


================
@@ -1669,6 +1671,58 @@ void use() {}
                                     getFullPath("Consumer.cpp"), *NewCI));
 }
 
+TEST_F(PrerequisiteModulesTests, ModuleSemanticHighlighting) {
+  MockDirectoryCompilationDatabase CDB(TestDir, FS);
+
+  llvm::StringRef AnnotatedCode = R"cpp(
+      module;
+      $import[[import]] $Namespace[[M]];
+      export module highlight;
+      $export[[export]] void $Function_def_globalScope[[foo]]() {
----------------
ArcsinX wrote:

Please, remove `$Namespace`  and `$Function_def_globalScope` annotations, as far as we don't check them

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


More information about the cfe-commits mailing list