Skip to content

Commit 42ec6b0

Browse files
committed
Swift: add ExtractFunctionIsolationTree to control flow
1 parent 2910cb6 commit 42ec6b0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,6 +1866,15 @@ module Exprs {
18661866
}
18671867
}
18681868

1869+
private class ExtractFunctionIsolationTree extends AstStandardPostOrderTree {
1870+
override ExtractFunctionIsolationExpr ast;
1871+
1872+
final override ControlFlowElement getChildNode(int i) {
1873+
i = 0 and
1874+
result.asAstNode() = ast.getFunctionExpr().getFullyConverted()
1875+
}
1876+
}
1877+
18691878
module Conversions {
18701879
class ConversionOrIdentity =
18711880
Synth::TIdentityExpr or Synth::TExplicitCastExpr or Synth::TImplicitConversionExpr or

0 commit comments

Comments
 (0)