mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
More StmtParent -> SwitchBlock
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user