diff options
author | Daniel Jasper <djasper@google.com> | 2013-12-16 14:53:57 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-12-16 14:53:57 +0000 |
commit | 5c6ee49fa037acf664c549bf08327d89907309e6 (patch) | |
tree | 76e88b0a0e81d15b86ac7ade6afd61b4d25c4960 /clang/test/Modules/modular_maps.cpp | |
parent | 3bb50b0ff84ebf6ca7d4506eba8fc89f96d0d993 (diff) | |
download | bcm5719-llvm-5c6ee49fa037acf664c549bf08327d89907309e6.tar.gz bcm5719-llvm-5c6ee49fa037acf664c549bf08327d89907309e6.zip |
Modules: Make missing headers in a module.map a warning not an error.
Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.
A better long-term strategy might be to not stat the header files at all
while reading the module map and instead read them only when the module
is being built (there is a corresponding FIXME in parseHeaderDecl()).
However, it seems non-trivial to get there and this would be a temporary
solution to unblock us.
Also changed the implementation to reuse the same DiagnosticsEngine as
otherwise warnings can't be enabled or disabled with command-line flags.
llvm-svn: 197388
Diffstat (limited to 'clang/test/Modules/modular_maps.cpp')
-rw-r--r-- | clang/test/Modules/modular_maps.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Modules/modular_maps.cpp b/clang/test/Modules/modular_maps.cpp index 9c9aba85a91..cb305f2dfdb 100644 --- a/clang/test/Modules/modular_maps.cpp +++ b/clang/test/Modules/modular_maps.cpp @@ -1,5 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -I %S/Inputs/modular_maps %s -verify +// RUN: %clang_cc1 -fmodules -fmodule-maps -fmodules-cache-path=%t -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -I %S/Inputs/modular_maps %s -verify + +// expected-warning@Inputs/modular_maps/modulea.map:4{{header 'doesnotexists.h' not found}} #include "common.h" #include "a.h" |