From: Douglas Gregor Date: Fri, 4 Jan 2013 18:58:28 +0000 (+0000) Subject: Add the module name to the 'incomplete umbrella header' warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9c3907e66659e4457593fdec4a27c671c12e041;p=clang Add the module name to the 'incomplete umbrella header' warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171497 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index c6c50ab37b..dbb5b4e58f 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -521,7 +521,8 @@ def warn_auto_module_import : Warning< "treating #%select{include|import|include_next|__include_macros}0 as an " "import of module '%1'">, InGroup, DefaultIgnore; def warn_uncovered_module_header : Warning< - "umbrella header does not include header '%0'">, InGroup; + "umbrella header for module '%0' does not include header '%1'">, + InGroup; def err_expected_id_building_module : Error< "expected a module name in '__building_module' expression">; diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index 0ce67dce7e..be4defe786 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -395,7 +395,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { SmallString<128> RelativePath; computeRelativePath(FileMgr, Dir, Header, RelativePath); Diag(StartLoc, diag::warn_uncovered_module_header) - << RelativePath; + << Mod->getFullModuleName() << RelativePath; } } } diff --git a/test/Modules/build-fail-notes.m b/test/Modules/build-fail-notes.m index 93809daca3..63428ec192 100644 --- a/test/Modules/build-fail-notes.m +++ b/test/Modules/build-fail-notes.m @@ -25,7 +25,7 @@ extern int Module; // CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from // CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from // CHECK-SDIAG: note: expanded from here -// CHECK-SDIAG: warning: umbrella header does not include header 'NotInModule.h' [-Wincomplete-umbrella] +// CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella] // CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module' // CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from