Skip to content

Commit 05d46a6

Browse files
committed
C++: Also ignore phi input edges in 'AllocaInLoop.ql'.
1 parent 0149fb6 commit 05d46a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ class LoopWithAlloca extends Stmt {
209209
DataFlow::localFlow(result, DataFlow::exprNode(va)) and
210210
// Phi nodes will be preceded by nodes that represent actual definitions
211211
not result instanceof DataFlow::SsaPhiNode and
212+
not result instanceof DataFlow::SsaPhiInputNode and
212213
// A source is outside the loop if it's not inside the loop
213214
not exists(Expr e | e = getExpr(result) | this = getAnEnclosingLoopOfExpr(e))
214215
)

0 commit comments

Comments
 (0)