Clang Project

clang_source_code/test/Index/create-libclang-parsing-reproducer.c
1// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: env CINDEXTEST_INVOCATION_EMISSION_PATH=%t not c-index-test -test-load-source all %s
4// RUN: %clang -cc1gen-reproducer %t/libclang-* -v | FileCheck %s
5
6// Invocation file must be removed by clang:
7// RUN: ls %t | count 0
8
9// RUN: rm -rf %t
10// RUN: mkdir %t
11// RUN: env CINDEXTEST_INVOCATION_EMISSION_PATH=%t not c-index-test -test-load-source all "-remap-file=%s,%S/Inputs/record-parsing-invocation-remap.c" %s
12// RUN: %clang -cc1gen-reproducer %t/libclang-* -v | FileCheck %s
13
14//#pragma clang __debug parser_crash
15
16// CHECK: REPRODUCER METAINFO: {"libclang.operation": "parse", "libclang.opts": "1"}
17
18// CHECK: REPRODUCER:
19// CHECK-NEXT: {
20// CHECK-NEXT: "files":["{{.*}}.c","{{.*}}.sh"]
21// CHECK-NEXT: }
22