diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2021-12-23 21:10:07 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2021-12-23 21:10:07 +0800 |
commit | 1e2c31c66be79b6ca6aeb42fc2835017935b8b27 (patch) | |
tree | c366c33db1de0c518b4bf5b1ffe19cb1b13b6150 /clang/lib/Sema/SemaModule.cpp | |
parent | 368318bcce66d9fef420fc34cca361b79d80cee5 (diff) | |
download | llvm-1e2c31c66be79b6ca6aeb42fc2835017935b8b27.zip llvm-1e2c31c66be79b6ca6aeb42fc2835017935b8b27.tar.gz llvm-1e2c31c66be79b6ca6aeb42fc2835017935b8b27.tar.bz2 |
Revert "[C++20] [Coroutines] Mark imported module as imported if not exported"
This reverts commit 368318bcce66d9fef420fc34cca361b79d80cee5.
The title is not right. It should be a patch about modules instead of
coroutines.
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r-- | clang/lib/Sema/SemaModule.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index a4b9f3c..f497199 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -383,18 +383,11 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, if (!ModuleScopes.empty()) Context.addModuleInitializer(ModuleScopes.back().Module, Import); + // Re-export the module if needed. if (!ModuleScopes.empty() && ModuleScopes.back().ModuleInterface) { - // 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. if (ExportLoc.isValid() || getEnclosingExportDecl(Import)) getCurrentModule()->Exports.emplace_back(Mod, false); - else - getCurrentModule()->Imports.insert(Mod); } else if (ExportLoc.isValid()) { - // [module.interface]p1: - // An export-declaration shall inhabit a namespace scope and appear in the - // purview of a module interface unit. Diag(ExportLoc, diag::err_export_not_in_module_interface); } |