xref: /llvm-project/clang/test/PCH/gch-probe.c (revision 0f67c7a0af271888930bb315c85d05d3936e265a)
1 // Unsupported on AIX because we don't support the requisite "__clangast"
2 // section in XCOFF yet.
3 // UNSUPPORTED: target={{.*}}-aix{{.*}}
4 
5 // For GCC compatibility, clang should probe also with the .gch extension.
6 // RUN: %clang -x c-header -c %s -o %t.h.gch
7 // RUN: %clang -fsyntax-only -include %t.h %s
8 
9 // -gmodules embeds the Clang AST file in an object file.
10 // RUN: %clang -x c-header -c %s -gmodules -o %t.h.gch
11 // RUN: %clang -fsyntax-only -include %t.h %s
12 
13 // gch probing should ignore files which are not clang pch files.
14 // RUN: %clang -fsyntax-only -include %S/Inputs/gch-probe.h %s 2>&1 | FileCheck %s
15 // CHECK: warning: precompiled header '{{.*}}gch-probe.h.gch' was ignored because it is not a clang PCH file
16 
17 void f(void);
18