Skip to content

Commit 269ea75

Browse files
author
Paolo Tranquilli
committed
Rust: matched_expr -> scrutinee
1 parent b47e961 commit 269ea75

File tree

14 files changed

+40
-44
lines changed

14 files changed

+40
-44
lines changed

rust/ql/.generated.list

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/.gitattributes

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,14 +514,14 @@ module ExprTrees {
514514

515515
class MatchExprTree extends PostOrderTree instanceof MatchExpr {
516516
override predicate propagatesAbnormal(AstNode child) {
517-
child = [super.getMatchedExpr(), super.getAnArm().getExpr()]
517+
child = [super.getScrutinee(), super.getAnArm().getExpr()]
518518
}
519519

520-
override predicate first(AstNode node) { first(super.getMatchedExpr(), node) }
520+
override predicate first(AstNode node) { first(super.getScrutinee(), node) }
521521

522522
override predicate succ(AstNode pred, AstNode succ, Completion c) {
523523
// Edge from the scrutinee to the first arm or to the match expression if no arms.
524-
last(super.getMatchedExpr(), pred, c) and
524+
last(super.getScrutinee(), pred, c) and
525525
(
526526
first(super.getArm(0).getPat(), succ)
527527
or

rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/internal/MatchExprImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module Impl {
2929
*/
3030
class MatchExpr extends Generated::MatchExpr {
3131
override string toString() {
32-
result = "match " + this.getMatchedExpr().toAbbreviatedString() + " { ... }"
32+
result = "match " + this.getScrutinee().toAbbreviatedString() + " { ... }"
3333
}
3434

3535
/**

rust/ql/lib/codeql/rust/elements/internal/generated/MatchExpr.qll

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| gen_match_expr.rs:5:5:8:5 | match x { ... } | getNumberOfAttrs: | 0 | hasMatchedExpr: | yes | hasMatchArmList: | yes |
2-
| gen_match_expr.rs:9:5:12:5 | match x { ... } | getNumberOfAttrs: | 0 | hasMatchedExpr: | yes | hasMatchArmList: | yes |
1+
| gen_match_expr.rs:5:5:8:5 | match x { ... } | getNumberOfAttrs: | 0 | hasScrutinee: | yes | hasMatchArmList: | yes |
2+
| gen_match_expr.rs:9:5:12:5 | match x { ... } | getNumberOfAttrs: | 0 | hasScrutinee: | yes | hasMatchArmList: | yes |

rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)