2 // RUN: rm -rf %t-saved
5 // Initial module build
6 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fbuiltin-headers-in-system-modules \
7 // RUN: -fmodules-cache-path=%t -fdisable-module-hash -isystem %S/Inputs/System/usr/include \
8 // RUN: -fsyntax-only %s -verify
9 // RUN: cp %t/cstd.pcm %t-saved/cstd.pcm
11 // Even with -Werror don't rebuild a system module
12 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fbuiltin-headers-in-system-modules \
13 // RUN: -fmodules-cache-path=%t -fdisable-module-hash -isystem %S/Inputs/System/usr/include \
14 // RUN: -fsyntax-only %s -verify -Werror
15 // RUN: diff %t/cstd.pcm %t-saved/cstd.pcm
17 // Unless -Wsystem-headers is on
18 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fbuiltin-headers-in-system-modules \
19 // RUN: -fmodules-cache-path=%t -fdisable-module-hash -isystem %S/Inputs/System/usr/include \
20 // RUN: -fsyntax-only %s -verify -Werror=unused -Wsystem-headers
21 // RUN: not diff %t/cstd.pcm %t-saved/cstd.pcm
23 // expected-no-diagnostics