mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Merge pull request #16677 from MathiasVP/phi-input-nodes
C++: Extend barrier guards to handle phi inputs
This commit is contained in:
@@ -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))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user