Skip to content

Commit c43ba45

Browse files
committed
CPP: Remove old DeleteOrDeleteArrayExpr from a query.
1 parent 4ca98bd commit c43ba45

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@ import cpp
1717
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
1818
import semmle.code.cpp.controlflow.Guards
1919

20-
/**
21-
* A C++ `delete` or `delete[]` expression.
22-
*/
23-
class DeleteOrDeleteArrayExpr extends Expr {
24-
DeleteOrDeleteArrayExpr() { this instanceof DeleteExpr or this instanceof DeleteArrayExpr }
25-
26-
DeallocationFunction getDeallocator() {
27-
result = [this.(DeleteExpr).getDeallocator(), this.(DeleteArrayExpr).getDeallocator()]
28-
}
29-
30-
Destructor getDestructor() {
31-
result = [this.(DeleteExpr).getDestructor(), this.(DeleteArrayExpr).getDestructor()]
32-
}
33-
}
34-
3520
/** Gets the `Constructor` invoked when `newExpr` allocates memory. */
3621
Constructor getConstructorForAllocation(NewOrNewArrayExpr newExpr) {
3722
result.getACallToThisFunction() = newExpr.getInitializer()

0 commit comments

Comments
 (0)