aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2022-12-13 08:45:08 +0000
committerIain Sandoe <iain@sandoe.co.uk>2023-01-22 10:22:36 +0000
commit53a1314ed1b5021822071d3c7a751a5ec52619b7 (patch)
tree09c5cb7af9f1f93df492744c2571f0b7490c4270 /clang/lib/Sema/SemaModule.cpp
parent22f6531449491012a4a60a1d993aa93f6ade3a01 (diff)
downloadllvm-53a1314ed1b5021822071d3c7a751a5ec52619b7.zip
llvm-53a1314ed1b5021822071d3c7a751a5ec52619b7.tar.gz
llvm-53a1314ed1b5021822071d3c7a751a5ec52619b7.tar.bz2
[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
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r--clang/lib/Sema/SemaModule.cpp3
1 files changed, 0 insertions, 3 deletions
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.