aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r--clang/lib/Sema/SemaModule.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp
index cd38cd4..9b8af60 100644
--- a/clang/lib/Sema/SemaModule.cpp
+++ b/clang/lib/Sema/SemaModule.cpp
@@ -531,6 +531,12 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc,
if (!Mod)
return true;
+ if (!Mod->isInterfaceOrPartition() && !ModuleName.empty()) {
+ Diag(ImportLoc, diag::err_module_import_non_interface_nor_parition)
+ << ModuleName;
+ return true;
+ }
+
return ActOnModuleImport(StartLoc, ExportLoc, ImportLoc, Mod, Path);
}