History log of /external/clang/test/Analysis/NewDelete-checker-test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Analysis/NewDelete-checker-test.cpp
81557223ba8d7ef8b0468a6e1dc8fc79f2de46f2 25-Sep-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Handle destructors for the argument to C++ 'delete'.

Now that the CFG includes nodes for the destructors in a delete-expression,
process them in the analyzer using the same common destructor interface
currently used for local, member, and base destructors. Also, check for when
the value is known to be null, in which case no destructor is actually run.

This does not yet handle destructors for deleted /arrays/, which may need
more CFG work. It also causes a slight regression in the location of
double delete warnings; the double delete is detected at the destructor
call, which is implicit, and so is reported on the first access within the
destructor instead of at the 'delete' statement. This will be fixed soon.

Patch by Karthik Bhat!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
fa220f58f02014e4a3389f429b82948a09dc4986 09-Aug-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Warn when using 'delete' on an uninitialized variable.

Patch by Karthik Bhat, modified slightly by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
50fa64d4411a42e0b4f373a84d8d4f5cbf339ea3 17-May-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Don't inline ~shared_ptr.

The analyzer can't see the reference count for shared_ptr, so it doesn't
know whether a given destruction is going to delete the referenced object.
This leads to spurious leak and use-after-free warnings.

For now, just ban destructors named '~shared_ptr', which catches
std::shared_ptr, std::tr1::shared_ptr, and boost::shared_ptr.

PR15987

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
9df151c5bc2a746096632bbd21dc61e18675ed55 13-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Enable NewDelete checker if NewDeleteLeaks checker is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
337ad7627ca82b1bcba37618d40129c3e59be86b 11-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] +Testcase: several used-after-free args passed to a function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
55e57a50a36749ce0483db2f16259649c9d25792 11-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Switched to checkPreCall interface for detecting usage after free.

Now the check is also applied to arguments for Objective-C method calls and to 'this' pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
68eb4c25e961d18f82b47a0a385f90d7af09bcc3 06-Apr-2013 Anna Zaks <ganna@apple.com> [analyzer] Shorten the malloc checker’s leak message

As per Ted’s suggestion!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
e449edc5bdace60f9d754c32abc5459bc7d94a14 05-Apr-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).

As mentioned in the previous commit message, the use-after-free and
double-free warnings for 'delete' are worth enabling even while the
leak warnings still have false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
e85deb356f5d2d2172b7ef70314bc9cfc742a936 05-Apr-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Split new/delete checker into use-after-free and leaks parts.

This splits the leak-checking part of alpha.cplusplus.NewDelete into a
separate user-level checker, alpha.cplusplus.NewDeleteLeaks. All the
difficult false positives we've seen with the new/delete checker have been
spurious leak warnings; the use-after-free warnings and mismatched
deallocator warnings, while rare, have always been valid.

<rdar://problem/6194569>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
648cb71625a2ab3164b2cacac9e9cb3d22b03bd7 05-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Reduced the unwanted correlations between checkers living inside MallocChecker.cpp

This fixes an issue pointed to by Jordan: if unix.Malloc and unix.MismatchedDeallocator are both on, then we end up still tracking leaks of memory allocated by new.
Moved the guards right before emitting the bug reports to unify and simplify the logic of handling of multiple checkers. Now all the checkers perform their checks regardless of if they were enabled, or not, and it is decided just before the emitting of the report, if it should be emitted. (idea from Anna).

Additional changes:
improved test coverage for checker correlations;
refactoring: BadDealloc -> MismatchedDealloc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
3d11708c491a96198ebfee49079ae458ed90eaf8 02-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Moving cplusplus.NewDelete to alpha.* for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
8e452e7d6ee00a7d12eb54b91498b59b6fefef4f 30-Mar-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Enabled unix.Malloc checker.
+ Refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp
1f3b5d990e9afa0b2b8db0908f46d8de7818e642 30-Mar-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Tests for intersections with other checkers from MallocChecker.cpp factored out to NewDelete-intersections.mm

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/NewDelete-checker-test.cpp