summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2018-02-24 06:54:09 +0000
committerDaniel Jasper <djasper@google.com>2018-02-24 06:54:09 +0000
commit4ea330c8c37ca1cd7f1c60332452e252e335511c (patch)
tree9bbebae0183eba771cf6592229d849800d3871a3 /clang/lib/Lex/ModuleMap.cpp
parent5dc6ca8e5bdc5552349989349718dd0fe7b05d6a (diff)
downloadbcm5719-llvm-4ea330c8c37ca1cd7f1c60332452e252e335511c.tar.gz
bcm5719-llvm-4ea330c8c37ca1cd7f1c60332452e252e335511c.zip
Make module use diagnostics refer to the top-level module
All use declarations need to be directly placed in the top-level module anyway, knowing the submodule doesn't really help. The header that has the offending #include can easily be seen in the diagnostics source location. Review: https://reviews.llvm.org/D43673 llvm-svn: 326023
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 657eef167a6..2ff0a68cb5f 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -475,7 +475,7 @@ void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule,
// We have found a module, but we don't use it.
if (NotUsed) {
Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module)
- << RequestingModule->getFullModuleName() << Filename;
+ << RequestingModule->getTopLevelModule()->Name << Filename;
return;
}
@@ -486,7 +486,7 @@ void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule,
if (LangOpts.ModulesStrictDeclUse) {
Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module)
- << RequestingModule->getFullModuleName() << Filename;
+ << RequestingModule->getTopLevelModule()->Name << Filename;
} else if (RequestingModule && RequestingModuleIsModuleInterface &&
LangOpts.isCompilingModule()) {
// Do not diagnose when we are not compiling a module.
OpenPOWER on IntegriCloud