We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isBefore
1 parent f406914 commit 7eca4b4Copy full SHA for 7eca4b4
cpp/ql/lib/semmle/code/cpp/Location.qll
@@ -75,7 +75,10 @@ class Location extends @location {
75
76
/** Holds if `this` comes on a line strictly before `l`. */
77
pragma[inline]
78
- predicate isBefore(Location l) { this.isBefore(l, false) }
+ predicate isBefore(Location l) {
79
+ this.getFile() = l.getFile() and
80
+ this.getEndLine() < l.getStartLine()
81
+ }
82
83
/**
84
* Holds if `this` comes strictly before `l`. The boolean `sameLine` is
0 commit comments