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