summaryrefslogtreecommitdiff
path: root/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-04-21 19:49:57 +0000
committerBen Langmuir <blangmuir@apple.com>2014-04-21 19:49:57 +0000
commitb36744fe467ec4f7adbce29a5f4f3f77c7ea695d (patch)
treedebc4f9a52c87021fbba2f3edd6bb5cffbf58d24 /lib/Lex/ModuleMap.cpp
parentf9d2832618bdfdcb2fb6673a0ff0464fd1e6affa (diff)
downloadclang-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
Diffstat (limited to 'lib/Lex/ModuleMap.cpp')
-rw-r--r--lib/Lex/ModuleMap.cpp3
1 files changed, 2 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;
}