Skip to content

Commit ef68bd6

Browse files
committed
C++: Add a test of direct calls to operator new / operator dedelete.
1 parent aa49b35 commit ef68bd6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/ql/test/library-tests/allocators/allocators.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,9 @@ void multidimensionalNew(int x, int y) {
143143
auto p2 = new char[20][20];
144144
auto p3 = new char[x][30][30];
145145
}
146+
147+
void directOperatorCall() {
148+
void *ptr;
149+
ptr = operator new(sizeof(int));
150+
operator delete(ptr);
151+
}

0 commit comments

Comments
 (0)