Skip to content

Commit 245d8f5

Browse files
Update clang/test/Analysis/NewDelete-checker-test.cpp
Co-authored-by: Balázs Benics <[email protected]>
1 parent 2b861b6 commit 245d8f5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/test/Analysis/NewDelete-checker-test.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ void testGlobalNoThrowPlacementExprNewBeforeOverload() {
6767
//----- Standard pointer placement operators
6868
void testGlobalPointerPlacementNew() {
6969
int i;
70-
void *p1 = operator new(0, &i); // no warn
71-
72-
void *p2 = operator new[](0, &i); // no warn
73-
74-
int *p3 = new(&i) int; // no warn
75-
76-
int *p4 = new(&i) int[0]; // no warn
70+
void *p1 = operator new(0, &i); // no leak: placement new never allocates
71+
void *p2 = operator new[](0, &i); // no leak
72+
int *p3 = new(&i) int; // no leak
73+
int *p4 = new(&i) int[0]; // no leak
7774
}
7875

7976
template<typename T>

0 commit comments

Comments
 (0)