From 4898cde4e100d65de375ee0bbf19c66061fa4f25 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Mon, 21 Apr 2014 19:49:57 +0000 Subject: 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. llvm-svn: 206776 --- clang/lib/Lex/ModuleMap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 0e712b0dce6..068e16d0431 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/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; } -- cgit v1.2.3