[analyzer] Different handling of alloca().
authorAnton Yartsev <anton.yartsev@gmail.com>
Thu, 19 Feb 2015 13:36:20 +0000 (13:36 +0000)
committerAnton Yartsev <anton.yartsev@gmail.com>
Thu, 19 Feb 2015 13:36:20 +0000 (13:36 +0000)
commit5b5c7cec081e29f8019e967333a8d893f0c83da5
treec1519a2b71d36697921c709e8e9609bd3f996f57
parentf0f0d2739127cd8971f0c91a45596ac40effb53b
[analyzer] Different handling of alloca().

+ separate bug report for "Free alloca()" error to be able to customize checkers responsible for this error.
+ Muted "Free alloca()" error for NewDelete checker that is not responsible for c-allocated memory, turned on for unix.MismatchedDeallocator checker.
+ RefState for alloca() - to be able to detect usage of zero-allocated memory by upcoming ZeroAllocDereference checker.
+ AF_Alloca family to handle alloca() consistently - keep proper family in RefState, handle 'alloca' by getCheckIfTracked() facility, etc.
+ extra tests.

llvm-svn: 229850
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
clang/test/Analysis/MismatchedDeallocator-checker-test.mm
clang/test/Analysis/NewDelete-checker-test.cpp
clang/test/Analysis/NewDelete-intersections.mm
clang/test/Analysis/free.c