mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Replace getDefaultOrNullDefaultCase with getDefaultCase
This commit is contained in:
@@ -403,11 +403,12 @@ class SwitchStmt extends Stmt, @switchstmt {
|
||||
/** Gets a (non-default) pattern `case` of this `switch` statement. */
|
||||
PatternCase getAPatternCase() { result = this.getACase() }
|
||||
|
||||
/** Gets the `default` case of this switch statement, if any. */
|
||||
DefaultCase getDefaultCase() { result = this.getACase() }
|
||||
|
||||
/** Gets the `default` or `case null, default` case of this switch statement, if any. */
|
||||
SwitchCase getDefaultOrNullDefaultCase() { result = this.getACase() and result.hasDefaultLabel() }
|
||||
/**
|
||||
* Gets the `default` case of this switch statement, if any.
|
||||
*
|
||||
* Note this may be `default` or `case null, default`.
|
||||
*/
|
||||
SwitchCase getDefaultCase() { result = this.getACase() and result.hasDefaultLabel() }
|
||||
|
||||
/** Gets the expression of this `switch` statement. */
|
||||
Expr getExpr() { result.getParent() = this }
|
||||
|
||||
Reference in New Issue
Block a user