diff options
author | Anton Yartsev <anton.yartsev@gmail.com> | 2013-03-25 01:35:45 +0000 |
---|---|---|
committer | Anton Yartsev <anton.yartsev@gmail.com> | 2013-03-25 01:35:45 +0000 |
commit | 2de19edab6001d2c17720d02fe0760b9b452192a (patch) | |
tree | f792075065beedffec03e05b22968e81b285448c /test/Analysis/inline.cpp | |
parent | 8f7bfb40b72f478d83b018a280f99c0386576ae3 (diff) |
[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/inline.cpp')
-rw-r--r-- | test/Analysis/inline.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Analysis/inline.cpp b/test/Analysis/inline.cpp index 27853dc2aa..a16fa00d12 100644 --- a/test/Analysis/inline.cpp +++ b/test/Analysis/inline.cpp @@ -288,6 +288,7 @@ namespace OperatorNew { IntWrapper *obj = new IntWrapper(42); // should be TRUE clang_analyzer_eval(obj->value == 42); // expected-warning{{UNKNOWN}} + delete obj; } void testPlacement() { |