From 53a1314ed1b5021822071d3c7a751a5ec52619b7 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Tue, 13 Dec 2022 08:45:08 +0000 Subject: [C++20][Modules] Fix named module import diagnostics. We have been incorrectly disallowing imports of named modules in the global and private module fragments. This addresses: https://github.com/llvm/llvm-project/issues/59688 Differential Revision: https://reviews.llvm.org/D140927 --- clang/lib/Sema/SemaModule.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'clang/lib/Sema/SemaModule.cpp') diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index 823a4e9..f52c024 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -591,9 +591,6 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, (ModuleScopes.back().ModuleInterface || (getLangOpts().CPlusPlusModules && ModuleScopes.back().Module->isGlobalModule()))) { - assert((!ModuleScopes.back().Module->isGlobalModule() || - Mod->Kind == Module::ModuleKind::ModuleHeaderUnit) && - "should only be importing a header unit into the GMF"); // Re-export the module if the imported module is exported. // Note that we don't need to add re-exported module to Imports field // since `Exports` implies the module is imported already. -- cgit v1.1