llvm-project/clang/tools
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
..
arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-index-test Clean up use of C allocation functions 2018-02-21 02:02:39 +00:00
clang-check [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-diff [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
clang-format-vs clang-format plugin: Add missing semicolon in list of file extensions (PR36383) 2018-02-20 09:26:38 +00:00
clang-func-mapping [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-fuzzer [clang-proto-to-cxx] Accept protobufs with missing fields. 2018-02-02 20:22:20 +00:00
clang-import-test [clang-import-test] Run clang-format, NFC 2018-02-07 21:17:22 +00:00
clang-offload-bundler Update for llvm change. NFC. 2018-02-14 19:11:37 +00:00
clang-refactor [cmake] Delete redundant install command for clang-refactor. 2018-01-10 01:00:28 +00:00
clang-rename [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
diag-build
diagtool [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
driver [Driver] Suggest valid integrated tools 2018-01-15 21:05:40 +00:00
libclang Clean up use of C allocation functions 2018-02-21 02:02:39 +00:00
scan-build [scan-build] Add an option to skip overriding CC and CXX make vars 2018-01-29 16:49:34 +00:00
scan-build-py Fix typos of occurred and occurrence 2018-01-24 10:26:09 +00:00
scan-view Add coding and shebang. 2017-03-02 18:47:22 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00