diff options
author | Anton Yartsev <anton.yartsev@gmail.com> | 2015-02-19 13:36:20 +0000 |
---|---|---|
committer | Anton Yartsev <anton.yartsev@gmail.com> | 2015-02-19 13:36:20 +0000 |
commit | 5b5c7cec081e29f8019e967333a8d893f0c83da5 (patch) | |
tree | c1519a2b71d36697921c709e8e9609bd3f996f57 /clang/test/Analysis/NewDelete-checker-test.cpp | |
parent | f0f0d2739127cd8971f0c91a45596ac40effb53b (diff) | |
download | bcm5719-llvm-5b5c7cec081e29f8019e967333a8d893f0c83da5.tar.gz bcm5719-llvm-5b5c7cec081e29f8019e967333a8d893f0c83da5.zip |
[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
Diffstat (limited to 'clang/test/Analysis/NewDelete-checker-test.cpp')
-rw-r--r-- | clang/test/Analysis/NewDelete-checker-test.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/test/Analysis/NewDelete-checker-test.cpp b/clang/test/Analysis/NewDelete-checker-test.cpp index 84176c9097c..3f28c2e8f2f 100644 --- a/clang/test/Analysis/NewDelete-checker-test.cpp +++ b/clang/test/Analysis/NewDelete-checker-test.cpp @@ -144,11 +144,6 @@ void testUseThisAfterDelete() { c->f(0); // expected-warning{{Use of memory after it is freed}} } -void testDeleteAlloca() { - int *p = (int *)__builtin_alloca(sizeof(int)); - delete p; // expected-warning{{Memory allocated by alloca() should not be deallocated}} -} - void testDoubleDelete() { int *p = new int; delete p; |