From dfc56b43fadf5c4f84cdb8706f29ccf1ba68e5f1 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 2 Nov 2018 10:50:26 +0000 Subject: Revert "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX" This reverts commit r345803 and r345915 (a follow-up fix to r345803). Reason: r345803 blocks our internal integrate because of the new warnings showing up in too many places. The fix is actually correct, we will reland it after figuring out how to integrate properly. llvm-svn: 345963 --- clang/lib/Lex/ModuleMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 13d2b72..d44bf12 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -523,7 +523,7 @@ void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, // At this point, only non-modular includes remain. - if (RequestingModule && LangOpts.ModulesStrictDeclUse) { + if (LangOpts.ModulesStrictDeclUse) { Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module) << RequestingModule->getTopLevelModule()->Name << Filename; } else if (RequestingModule && RequestingModuleIsModuleInterface && -- cgit v1.1