llvm-project/clang/tools/c-index-test
Serge Pavlov 52525730a1 Clean up use of C allocation functions
If the value returned by `malloc`, `calloc` or `realloc` is not checked
for null pointer, this change replaces them for `safe_malloc`,
`safe_calloc` or `safe_realloc`, which are defined in the namespace `llvm`.
These function report fatal error on out of memory.

In the plain C files, assertion statements are added to ensure that memory
is successfully allocated.

The aim of this change is to get better diagnostics of OOM on Windows.

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

llvm-svn: 325661
2018-02-21 02:02:39 +00:00
..
CMakeLists.txt [clang] Add PRIVATE to target_link_libraries 2017-12-06 23:02:00 +00:00
c-index-test.c Clean up use of C allocation functions 2018-02-21 02:02:39 +00:00
core_main.cpp Teach ASTReader how to read only the Preprocessor state from an AST file, not the ASTContext state. 2017-06-29 23:23:46 +00:00