Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Index / record-parsing-invocation.c
blobe0c4cdb05fb00522105162c0f1dda9af42cec18c
1 // RUN: export LSAN_OPTIONS=detect_leaks=0
2 // RUN: rm -rf %t
3 // RUN: mkdir %t
4 // RUN: env CINDEXTEST_INVOCATION_EMISSION_PATH=%t not c-index-test -test-load-source all %s
5 // RUN: cat %t/libclang-* | FileCheck %s
7 // RUN: rm -rf %t
8 // RUN: mkdir %t
9 // RUN: env LIBCLANG_DISABLE_CRASH_RECOVERY=1 CINDEXTEST_INVOCATION_EMISSION_PATH=%t not --crash c-index-test -test-load-source all %s
10 // RUN: cat %t/libclang-* | FileCheck %s
12 // Verify that the file is removed for successful operation:
13 // RUN: rm -rf %t
14 // RUN: mkdir %t
15 // RUN: env CINDEXTEST_INVOCATION_EMISSION_PATH=%t c-index-test -test-load-source all %s -DAVOID_CRASH
16 // RUN: ls %t | count 0
18 // Make sure we record the unsaved file hash.
19 // RUN: rm -rf %t
20 // RUN: mkdir %t
21 // 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
22 // RUN: cat %t/libclang-* | FileCheck --check-prefix=CHECK-UNSAVED %s
24 #ifndef AVOID_CRASH
25 # pragma clang __debug parser_crash
26 #endif
28 // CHECK: {"toolchain":"{{.*}}","libclang.operation":"parse","libclang.opts":1,"args":["clang","-fno-spell-checking","{{.*}}record-parsing-invocation.c","-Xclang","-detailed-preprocessing-record","-fallow-editor-placeholders"]}
29 // CHECK-UNSAVED: {"toolchain":"{{.*}}","libclang.operation":"parse","libclang.opts":1,"args":["clang","-fno-spell-checking","{{.*}}record-parsing-invocation.c","-Xclang","-detailed-preprocessing-record","-fallow-editor-placeholders"],"unsaved_file_hashes":[{"name":"{{.*}}record-parsing-invocation.c","md5":"aee23773de90e665992b48209351d70e"}]}