Skip to content

Commit 155341e

Browse files
authored
Merge pull request #22791 from aschackmull/unified/cfg-enumcase-param
Unified: Allow pattern-less parameters.
2 parents 8834de5 + 4881edc commit 155341e

14 files changed

Lines changed: 5 additions & 31 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ module Ast implements AstSig<Location> {
5656
class Parameter extends U::Parameter {
5757
Expr getDefaultValue() { result = super.getDefault() }
5858

59-
AstNode getPattern() { result = super.getPattern() }
59+
AstNode getPattern() {
60+
result = super.getPattern()
61+
or
62+
not exists(super.getPattern()) and result = this
63+
}
6064
}
6165

6266
Parameter callableGetParameter(Callable c, int index) {

‎unified/ql/test/library-tests/BasicTest/CONSISTENCY/CfgConsistency.expected‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎unified/ql/test/library-tests/BasicTest/CONSISTENCY/LocalSsaConsistency.expected‎

Whitespace-only changes.

‎unified/ql/test/library-tests/constructors/CONSISTENCY/LocalSsaConsistency.expected‎

Whitespace-only changes.

‎unified/ql/test/library-tests/controlflow/CONSISTENCY/LocalSsaConsistency.expected‎

Whitespace-only changes.

‎unified/ql/test/library-tests/dataflow/CONSISTENCY/CfgConsistency.expected‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎unified/ql/test/library-tests/dataflow/CONSISTENCY/LocalSsaConsistency.expected‎

Whitespace-only changes.

‎unified/ql/test/library-tests/local-name-binding/CONSISTENCY/CfgConsistency.expected‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎unified/ql/test/library-tests/mad/CONSISTENCY/LocalSsaConsistency.expected‎

Whitespace-only changes.

‎unified/ql/test/library-tests/static-name-binding/CONSISTENCY/CfgConsistency.expected‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)