C++: Inline Location::isBefore.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-04-07 15:45:08 +02:00
parent 0ebb24ebeb
commit 03b12dbc6d

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()
}