mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #18859 from jketema/is-before
C++: Fix join-order problem with `isBefore`
This commit is contained in:
@@ -75,7 +75,10 @@ class Location extends @location {
|
||||
|
||||
/** Holds if `this` comes on a line strictly before `l`. */
|
||||
pragma[inline]
|
||||
predicate isBefore(Location l) { this.isBefore(l, false) }
|
||||
predicate isBefore(Location l) {
|
||||
this.getFile() = l.getFile() and
|
||||
this.getEndLine() < l.getStartLine()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `this` comes strictly before `l`. The boolean `sameLine` is
|
||||
|
||||
Reference in New Issue
Block a user