]> granicus.if.org Git - clang/commit
[libclang] Record parsing invocation to a temporary file when requested
authorAlex Lorenz <arphaman@gmail.com>
Mon, 4 Dec 2017 21:56:36 +0000 (21:56 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 4 Dec 2017 21:56:36 +0000 (21:56 +0000)
commit76f57b28554f0c281b1e5e3dc2749fe8c4893193
tree34cb2b8a86628c3bf4a16e6cdc4f477cd1034c6a
parentd80ab9d1a5be9068183b4433d417c61fdf02e179
[libclang] Record parsing invocation to a temporary file when requested
by client

This patch extends libclang by allowing it to record parsing operations to a
temporary JSON file. The file is deleted after parsing succeeds. When a crash
happens during parsing, the file is preserved and the client will be able to use
it to generate a reproducer for the crash.

These files are not emitted by default, and the client has to specify the
invocation emission path first.

rdar://35322543

Differential Revision: https://reviews.llvm.org/D40527

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319702 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang-c/Index.h
test/Index/record-parsing-invocation.c [new file with mode: 0644]
tools/c-index-test/c-index-test.c
tools/libclang/CIndex.cpp
tools/libclang/CIndexer.cpp
tools/libclang/CIndexer.h
tools/libclang/libclang.exports