We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 050e239 commit 492c5f3Copy full SHA for 492c5f3
cpp/ql/src/Critical/NewDelete.qll
@@ -13,14 +13,9 @@ import semmle.code.cpp.models.implementations.Deallocation
13
* a string describing the type of the allocation.
14
*/
15
predicate allocExpr(Expr alloc, string kind) {
16
- (
17
- alloc.(FunctionCall) instanceof AllocationExpr
18
- or
19
- alloc = any(NewOrNewArrayExpr new | not exists(new.getPlacementPointer()))
20
- ) and
21
(
22
exists(Function target |
23
- alloc.(FunctionCall).getTarget() = target and
+ alloc.(AllocationExpr).(FunctionCall).getTarget() = target and
24
25
target.getName() = "operator new" and
26
kind = "new"
0 commit comments