mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
Use SwitchCase.getSelectorExpr
This commit is contained in:
@@ -108,8 +108,7 @@ class Guard extends ExprParent {
|
||||
*/
|
||||
BasicBlock getBasicBlock() {
|
||||
result = this.(Expr).getBasicBlock() or
|
||||
result = this.(SwitchCase).getSwitch().getExpr().getBasicBlock() or
|
||||
result = this.(SwitchCase).getSwitchExpr().getExpr().getBasicBlock()
|
||||
result = this.(SwitchCase).getSelectorExpr().getBasicBlock()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -445,7 +445,7 @@ private predicate instanceOfGuarded(Expr e, RefType t) {
|
||||
*/
|
||||
private predicate patternCaseGuarded(Expr e, RefType t) {
|
||||
exists(PatternCase pc |
|
||||
e = getAProbableAlias([pc.getSwitch().getExpr(), pc.getSwitchExpr().getExpr()]) and
|
||||
e = getAProbableAlias(pc.getSelectorExpr()) and
|
||||
guardControls_v1(pc, e.getBasicBlock(), true) and
|
||||
t = pc.getPattern().getType()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user