Skip to content

Commit b4187f0

Browse files
committed
Add more docstrings
1 parent 6bbd610 commit b4187f0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cpp/common/src/codingstandards/cpp/allocations/CustomOperatorNewDelete.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class ReplaceableOperatorNew extends OperatorNewOrDelete {
5151
/**
5252
* `operator new`, `operator new[]`, `operator delete`, or `operator delete[]` functions
5353
* that are very likely provided by the user.
54+
*
55+
* Note that this captures _any_ function that has one of the above four names.
5456
*/
5557
class CustomOperatorNewOrDelete extends OperatorNewOrDelete {
5658
CustomOperatorNewOrDelete() {
@@ -78,6 +80,12 @@ class CustomOperatorNewOrDelete extends OperatorNewOrDelete {
7880
}
7981
}
8082

83+
/**
84+
* The replaceable `operator new` or `operator new[]` functions that have custom
85+
* definitions provided by the user.
86+
*
87+
* Also see `CustomReplaceableOperatorDelete`.
88+
*/
8189
class CustomReplaceableOperatorNew extends CustomOperatorNewOrDelete, ReplaceableOperatorNew { }
8290

8391
/**
@@ -107,6 +115,12 @@ class ReplaceableOperatorDelete extends OperatorNewOrDelete {
107115
}
108116
}
109117

118+
/**
119+
* The replaceable `operator new` or `operator new[]` functions that have custom
120+
* definitions provided by the user.
121+
*
122+
* Also see `CustomReplaceableOperatorNew`.
123+
*/
110124
class CustomReplaceableOperatorDelete extends CustomOperatorNewOrDelete, ReplaceableOperatorDelete {
111125
CustomReplaceableOperatorDelete getPartner() {
112126
if this.getAParameter().getType() instanceof Size_t

0 commit comments

Comments
 (0)