Add an experimental MallocSizeofChecker, which reports inconsistencies
between the casted type of the return value of a malloc/calloc/realloc call and the operand of any sizeof expressions contained within its argument(s). llvm-svn: 146144
Showing
- clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt 1 addition, 0 deletionsclang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
- clang/lib/StaticAnalyzer/Checkers/Checkers.td 4 additions, 0 deletionsclang/lib/StaticAnalyzer/Checkers/Checkers.td
- clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp 208 additions, 0 deletionsclang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
- clang/test/Analysis/malloc-sizeof.c 27 additions, 0 deletionsclang/test/Analysis/malloc-sizeof.c
Loading
Please register or sign in to comment