diff --git a/swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll b/swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll index 5a18c1db76f9..eef4b32f2d9b 100644 --- a/swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll +++ b/swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll @@ -1417,6 +1417,15 @@ module Exprs { } } + /** Control-flow for a `SingleValueStmtExpr`. See the QLDoc for `SingleValueStmtExpr` for the semantics of a `SingleValueStmtExpr`. */ + private class SingleValueStmtExprTree extends AstStandardPostOrderTree { + override SingleValueStmtExpr ast; + + final override ControlFlowElement getChildElement(int i) { + i = 0 and result.asAstNode() = ast.getStmt() + } + } + private class OpaqueValueExprTree extends AstLeafTree { override OpaqueValueExpr ast; } diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/CONSISTENCY/CfgConsistency.expected b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index 01748aa8e03e..000000000000 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -deadEnd -| test.swift:1:8:1:13 | x | diff --git a/swift/ql/test/library-tests/dataflow/flowsources/CONSISTENCY/CfgConsistency.expected b/swift/ql/test/library-tests/dataflow/flowsources/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index eca8be91c8b9..000000000000 --- a/swift/ql/test/library-tests/dataflow/flowsources/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -deadEnd -| alamofire.swift:469:9:469:9 | stream | -| alamofire.swift:484:9:484:9 | stream | -| alamofire.swift:499:9:499:9 | stream | -| alamofire.swift:514:9:514:9 | stream |