4 // RUN: %clang -x objective-c-header -fsyntax-only -fpch-validate-input-files-content %s -### 2>&1 | FileCheck --check-prefix=CHECK-CC1 %s
5 // CHECK-CC1: -fvalidate-ast-input-files-content
7 // PCH only: Test that a mtime mismatch without content change is fine
10 // RUN: echo '// m.h' > %t/m.h
11 // RUN: echo '#include "m.h"' > %t/a.h
12 // RUN: %clang_cc1 -emit-pch -o %t/a.pch -I %t -x objective-c-header %t/a.h -fvalidate-ast-input-files-content
13 // RUN: touch -m -a -t 202901010000 %t/m.h
14 // RUN: %clang_cc1 -fsyntax-only -I %t -include-pch %t/a.pch %s -verify -fvalidate-ast-input-files-content
16 // PCH only: Test that a mtime mismatch with content change
19 // RUN: echo '// m.h' > %t/m.h
20 // RUN: echo '#include "m.h"' > %t/a.h
21 // RUN: %clang_cc1 -emit-pch -o %t/a.pch -I %t -x objective-c-header %t/a.h -fvalidate-ast-input-files-content
22 // RUN: echo '// m.x' > %t/m.h
23 // RUN: touch -m -a -t 202901010000 %t/m.h
24 // RUN: not %clang_cc1 -fsyntax-only -I %t -include-pch %t/a.pch %s -fvalidate-ast-input-files-content 2> %t/stderr
25 // RUN: FileCheck %s < %t/stderr
27 // CHECK: file '[[M_H:.*[/\\]m\.h]]' has been modified since the precompiled header '[[A_PCH:.*/a\.pch]]' was built: content changed
28 // CHECK: please rebuild precompiled header '[[A_PCH]]'
29 // expected-no-diagnostics