mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Fix a bad join order on locations.
This commit is contained in:
@@ -12,8 +12,11 @@
|
|||||||
|
|
||||||
import javascript
|
import javascript
|
||||||
|
|
||||||
from LabeledStmt l, Case c
|
int labelInCaseStartColumn(Case c, LabeledStmt l) {
|
||||||
where
|
|
||||||
l = c.getAChildStmt+() and
|
l = c.getAChildStmt+() and
|
||||||
l.getLocation().getStartColumn() = c.getLocation().getStartColumn()
|
result = l.getLocation().getStartColumn()
|
||||||
|
}
|
||||||
|
|
||||||
|
from LabeledStmt l, Case c
|
||||||
|
where labelInCaseStartColumn(c, l) = c.getLocation().getStartColumn()
|
||||||
select l.getChildExpr(0), "Non-case labels in switch statements are confusing."
|
select l.getChildExpr(0), "Non-case labels in switch statements are confusing."
|
||||||
|
|||||||
Reference in New Issue
Block a user