aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/NewDelete-custom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/NewDelete-custom.cpp')
-rw-r--r--test/Analysis/NewDelete-custom.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Analysis/NewDelete-custom.cpp b/test/Analysis/NewDelete-custom.cpp
index 47105ff4ef..04dda2e7c3 100644
--- a/test/Analysis/NewDelete-custom.cpp
+++ b/test/Analysis/NewDelete-custom.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -analyzer-store region -std=c++11 -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
#include "Inputs/system-header-simulator-cxx.h"
void *allocator(std::size_t size);
@@ -22,8 +22,8 @@ void testNewMethod() {
} // expected-warning{{Memory is never released; potential leak}}
void testOpNewArray() {
- void *p = operator new[](0);
-} //FIXME: expected 'Memory is never released; potential leak'
+ void *p = operator new[](0); // call is inlined, no warn
+}
void testNewExprArray() {
int *p = new int[0];
@@ -31,8 +31,8 @@ void testNewExprArray() {
//----- Custom non-placement operators
void testOpNew() {
- void *p = operator new(0);
-} //FIXME: expected 'Memory is never released; potential leak'
+ void *p = operator new(0); // call is inlined, no warn
+}
void testNewExpr() {
int *p = new int;