More StmtParent -> SwitchBlock

This commit is contained in:
Chris Smowton
2023-11-28 12:06:45 +00:00
parent e93fe8d614
commit 94819e37c4
2 changed files with 2 additions and 2 deletions

View File

@@ -1684,7 +1684,7 @@ class LocalVariableDeclExpr extends Expr, @localvariabledeclexpr {
/**
* Gets the switch statement or expression whose pattern declares this identifier, if any.
*/
StmtParent getAssociatedSwitch() {
SwitchBlock getAssociatedSwitch() {
exists(PatternCase pc |
pc = result.(SwitchStmt).getAPatternCase()
or

View File

@@ -468,7 +468,7 @@ class SwitchCase extends Stmt, @case {
* Holds if this is the `n`th case of switch block `parent`.
*/
pragma[nomagic]
predicate isNthCaseOf(StmtParent parent, int n) {
predicate isNthCaseOf(SwitchBlock parent, int n) {
this.getCaseIndex() = n and this.getParent() = parent
}