Skip to content

Commit c87036f

Browse files
committed
CPP: Simplify.
1 parent 276738a commit c87036f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ predicate varMaybeStackAllocated(LocalVariable lv) {
3939
// that possibly points to the stack, or if it is a possibly stack allocated array
4040
// that is converted (implicitly or explicitly) to a pointer
4141
predicate exprMayPointToStack(Expr e) {
42-
e instanceof AddressOfExpr and exprMaybeStackAllocated(e.(AddressOfExpr).getAnOperand())
42+
exprMaybeStackAllocated(e.(AddressOfExpr).getAnOperand())
4343
or
4444
varMayPointToStack(e.(VariableAccess).getTarget())
4545
or

0 commit comments

Comments
 (0)