brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 8863b7a Raw
28 lines · plain
1// Check driver works2// RUN: %clang -x objective-c-header -fsyntax-only -fpch-validate-input-files-content %s -### 2>&1 | FileCheck --check-prefix=CHECK-CC1 %s3// CHECK-CC1: -fvalidate-ast-input-files-content4//5// PCH only: Test that a mtime mismatch without content change is fine6// RUN: rm -rf %t7// RUN: mkdir %t8// RUN: echo '// m.h' > %t/m.h9// RUN: echo '#include "m.h"' > %t/a.h10// RUN: %clang_cc1 -emit-pch -o %t/a.pch -I %t -x objective-c-header %t/a.h -fvalidate-ast-input-files-content11// RUN: touch -m -a -t 202901010000 %t/m.h12// RUN: %clang_cc1 -fsyntax-only -I %t -include-pch %t/a.pch %s -verify -fvalidate-ast-input-files-content13//14// PCH only: Test that a mtime mismatch with content change15// RUN: rm -rf %t16// RUN: mkdir %t17// RUN: echo '// m.h' > %t/m.h18// RUN: echo '#include "m.h"' > %t/a.h19// RUN: %clang_cc1 -emit-pch -o %t/a.pch -I %t -x objective-c-header %t/a.h -fvalidate-ast-input-files-content20// RUN: echo '// m.x' > %t/m.h21// RUN: touch -m -a -t 202901010000 %t/m.h22// RUN: not %clang_cc1 -fsyntax-only -I %t -include-pch %t/a.pch %s -fvalidate-ast-input-files-content 2> %t/stderr23// RUN: FileCheck %s < %t/stderr24//25// CHECK: file '[[M_H:.*[/\\]m\.h]]' has been modified since the precompiled header '[[A_PCH:.*/a\.pch]]' was built: content changed26// CHECK: please rebuild precompiled file '[[A_PCH]]'27// expected-no-diagnostics28