Author: vvassilev Date: Tue Apr 18 15:57:29 2017 New Revision: 300594 URL: http://llvm.org/viewvc/llvm-project?rev=300594&view=rev Log: PR30508: Downgrade error to warning if the umbrella folder doesn't exist.
Patch by Yuka Takahashi (D32119)! Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td cfe/trunk/lib/Lex/ModuleMap.cpp cfe/trunk/test/Modules/umbrella-header-include-builtin.mm Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=300594&r1=300593&r2=300594&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original) +++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Tue Apr 18 15:57:29 2017 @@ -594,8 +594,6 @@ def err_mmap_expected_mmap_file : Error< def err_mmap_module_redefinition : Error< "redefinition of module '%0'">; def note_mmap_prev_definition : Note<"previously defined here">; -def err_mmap_umbrella_dir_not_found : Error< - "umbrella directory '%0' not found">; def err_mmap_umbrella_clash : Error< "umbrella for module '%0' already covers this directory">; def err_mmap_module_id : Error< @@ -656,6 +654,9 @@ def note_implicit_top_level_module_impor def warn_uncovered_module_header : Warning< "umbrella header for module '%0' does not include header '%1'">, InGroup<IncompleteUmbrella>; +def warn_mmap_umbrella_dir_not_found : Warning< + "umbrella directory '%0' not found">, + InGroup<IncompleteUmbrella>; def err_expected_id_building_module : Error< "expected a module name in '__building_module' expression">; def warn_use_of_private_header_outside_module : Warning< Modified: cfe/trunk/lib/Lex/ModuleMap.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=300594&r1=300593&r2=300594&view=diff ============================================================================== --- cfe/trunk/lib/Lex/ModuleMap.cpp (original) +++ cfe/trunk/lib/Lex/ModuleMap.cpp Tue Apr 18 15:57:29 2017 @@ -2002,9 +2002,8 @@ void ModuleMapParser::parseUmbrellaDirDe } if (!Dir) { - Diags.Report(DirNameLoc, diag::err_mmap_umbrella_dir_not_found) + Diags.Report(DirNameLoc, diag::warn_mmap_umbrella_dir_not_found) << DirName; - HadError = true; return; } Modified: cfe/trunk/test/Modules/umbrella-header-include-builtin.mm URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/umbrella-header-include-builtin.mm?rev=300594&r1=300593&r2=300594&view=diff ============================================================================== --- cfe/trunk/test/Modules/umbrella-header-include-builtin.mm (original) +++ cfe/trunk/test/Modules/umbrella-header-include-builtin.mm Tue Apr 18 15:57:29 2017 @@ -4,3 +4,11 @@ // RUN: %clang -cc1 -fsyntax-only -nostdinc++ -isysroot %S/Inputs/libc-libcxx/sysroot -isystem %S/Inputs/libc-libcxx/sysroot/usr/include/c++/v1 -F%S/Inputs/libc-libcxx/sysroot/Frameworks -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c++ %s #include <A/A.h> + +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "module NonExistent1 { umbrella \"NonExistent\" }" > %t/modules.modulemap +// RUN: echo "" > %t/A.h +// RUN: echo "#include \"A.h\" int i;" > %t/T.cxx +// RUN: %clang -I %t -fmodules -fsyntax-only %t/T.cxx +// expected-warning {{ umbrella directory }} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits