diff --git a/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll b/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll index 313feb1a145d..868b74b4023c 100644 --- a/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll +++ b/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll @@ -56,7 +56,11 @@ module Ast implements AstSig { class Parameter extends U::Parameter { Expr getDefaultValue() { result = super.getDefault() } - AstNode getPattern() { result = super.getPattern() } + AstNode getPattern() { + result = super.getPattern() + or + not exists(super.getPattern()) and result = this + } } Parameter callableGetParameter(Callable c, int index) { diff --git a/unified/ql/test/library-tests/BasicTest/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/library-tests/BasicTest/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index eaa376774829..000000000000 --- a/unified/ql/test/library-tests/BasicTest/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -consistencyOverview -| deadEnd | 2 | -deadEnd -| test.swift:59:10:59:25 | Entry | -| test.swift:60:10:60:25 | Entry | diff --git a/unified/ql/test/library-tests/BasicTest/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/BasicTest/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/library-tests/constructors/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/constructors/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/library-tests/controlflow/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/controlflow/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/library-tests/dataflow/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/library-tests/dataflow/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index ae1fa85c4383..000000000000 --- a/unified/ql/test/library-tests/dataflow/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -consistencyOverview -| deadEnd | 2 | -deadEnd -| enums.swift:7:10:7:22 | Entry | -| enums.swift:8:10:8:22 | Entry | diff --git a/unified/ql/test/library-tests/dataflow/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/dataflow/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/library-tests/local-name-binding/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/library-tests/local-name-binding/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index f125f6b6d4f7..000000000000 --- a/unified/ql/test/library-tests/local-name-binding/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -consistencyOverview -| deadEnd | 2 | -deadEnd -| test.swift:341:10:341:15 | Entry | -| test.swift:342:10:342:15 | Entry | diff --git a/unified/ql/test/library-tests/mad/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/mad/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/library-tests/static-name-binding/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/library-tests/static-name-binding/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index 943f915914c2..000000000000 --- a/unified/ql/test/library-tests/static-name-binding/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -consistencyOverview -| deadEnd | 1 | -deadEnd -| generics.swift:3:10:3:17 | Entry | diff --git a/unified/ql/test/library-tests/type-inference/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/library-tests/type-inference/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index f54308ecd5ef..000000000000 --- a/unified/ql/test/library-tests/type-inference/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,7 +0,0 @@ -consistencyOverview -| deadEnd | 4 | -deadEnd -| generics.swift:46:8:46:17 | Entry | -| generics.swift:47:8:47:22 | Entry | -| pattern_matching.swift:9:8:9:15 | Entry | -| pattern_matching.swift:10:8:10:34 | Entry | diff --git a/unified/ql/test/library-tests/type-inference/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/library-tests/type-inference/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/unified/ql/test/query-tests/security/CWE-022/PathInjection/CONSISTENCY/CfgConsistency.expected b/unified/ql/test/query-tests/security/CWE-022/PathInjection/CONSISTENCY/CfgConsistency.expected deleted file mode 100644 index b7d75c0421ae..000000000000 --- a/unified/ql/test/query-tests/security/CWE-022/PathInjection/CONSISTENCY/CfgConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -consistencyOverview -| deadEnd | 1 | -deadEnd -| testPathInjection.swift:330:14:330:62 | Entry | diff --git a/unified/ql/test/query-tests/security/CWE-022/PathInjection/CONSISTENCY/LocalSsaConsistency.expected b/unified/ql/test/query-tests/security/CWE-022/PathInjection/CONSISTENCY/LocalSsaConsistency.expected deleted file mode 100644 index e69de29bb2d1..000000000000