diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-04-21 19:49:57 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-04-21 19:49:57 +0000 |
commit | b36744fe467ec4f7adbce29a5f4f3f77c7ea695d (patch) | |
tree | debc4f9a52c87021fbba2f3edd6bb5cffbf58d24 | |
parent | f9d2832618bdfdcb2fb6673a0ff0464fd1e6affa (diff) | |
download | clang-b36744fe467ec4f7adbce29a5f4f3f77c7ea695d.tar.gz clang-b36744fe467ec4f7adbce29a5f4f3f77c7ea695d.tar.bz2 clang-b36744fe467ec4f7adbce29a5f4f3f77c7ea695d.tar.xz |
Allow submodule inferrences with a missing umbrella when the module is unavailable
If the module is unavailable because of a missing header, don't diagnose
a "module * {}" declaration for having a missing umbrella.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206776 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Lex/ModuleMap.cpp | 3 | ||||
-rw-r--r-- | test/Modules/Inputs/submodules/module.map | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp index 0e712b0dce..068e16d043 100644 --- a/lib/Lex/ModuleMap.cpp +++ b/lib/Lex/ModuleMap.cpp @@ -1988,7 +1988,8 @@ void ModuleMapParser::parseInferredModuleDecl(bool Framework, bool Explicit) { if (ActiveModule) { // Inferred modules must have umbrella directories. - if (!Failed && !ActiveModule->getUmbrellaDir()) { + if (!Failed && ActiveModule->IsAvailable && + !ActiveModule->getUmbrellaDir()) { Diags.Report(StarLoc, diag::err_mmap_inferred_no_umbrella); Failed = true; } diff --git a/test/Modules/Inputs/submodules/module.map b/test/Modules/Inputs/submodules/module.map index 27c1ee4c61..1c1b76a089 100644 --- a/test/Modules/Inputs/submodules/module.map +++ b/test/Modules/Inputs/submodules/module.map @@ -24,3 +24,9 @@ module missing_unavailable_headers { } module not_missing { } } + +module missing_umbrella_with_inferred_submodules { + umbrella header "missing_umbrella.h" + module * { export * } + export * +} |