Merge pull request #5622 from MathiasVP/inline-is-before

C++: Inline Location::isBefore
This commit is contained in:
Jonas Jensen
2021-04-08 11:24:33 +02:00
committed by GitHub

View File

@@ -72,6 +72,7 @@ class Location extends @location {
}
/** Holds if `this` comes on a line strictly before `l`. */
pragma[inline]
predicate isBefore(Location l) {
this.getFile() = l.getFile() and this.getEndLine() < l.getStartLine()
}