[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / pr4489.c
blob574e33f18c0d7b134ccaf2982f5fc4a71bc05f33
1 // RUN: %clang -x c-header -o %t.pch %s
2 // RUN: echo > %t.empty.c
3 // RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
5 // PR 4489: Crash with PCH
6 // PR 4492: Crash with PCH (round two)
7 // PR 4509: Crash with PCH (round three)
8 typedef struct _IO_FILE FILE;
9 extern int fprintf (struct _IO_FILE *__restrict __stream,
10 __const char *__restrict __format, ...);
12 int x(void)
14 switch (1) {
15 case 2: ;
16 int y = 0;
20 void y(void) {
21 extern char z;
22 fprintf (0, "a");
25 struct y0 { int i; } y0[1] = {};
27 void x0(void)
29 extern char z0;
30 fprintf (0, "a");
33 void x1(void)
35 fprintf (0, "asdf");
38 void y1(void)
40 extern char e;
41 fprintf (0, "asdf");