C++: Also ignore phi input edges in 'AllocaInLoop.ql'.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-05-22 16:23:42 +01:00
parent 0149fb640d
commit 05d46a6793

View File

@@ -209,6 +209,7 @@ class LoopWithAlloca extends Stmt {
DataFlow::localFlow(result, DataFlow::exprNode(va)) and
// Phi nodes will be preceded by nodes that represent actual definitions
not result instanceof DataFlow::SsaPhiNode and
not result instanceof DataFlow::SsaPhiInputNode and
// A source is outside the loop if it's not inside the loop
not exists(Expr e | e = getExpr(result) | this = getAnEnclosingLoopOfExpr(e))
)