diff options
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index dc1f32fb569..4312c89d0a7 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1675,7 +1675,10 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, getLangOpts().CurrentModule) { // If this include corresponds to a module but that module is // unavailable, diagnose the situation and bail out. - if (!SuggestedModule.getModule()->isAvailable()) { + // FIXME: Remove this; loadModule does the same check (but produces + // slightly worse diagnostics). + if (!SuggestedModule.getModule()->isAvailable() && + !SuggestedModule.getModule()->HasIncompatibleModuleFile) { clang::Module::Requirement Requirement; clang::Module::UnresolvedHeaderDirective MissingHeader; Module *M = SuggestedModule.getModule(); |