@@ -15,9 +15,17 @@ import python
1515 * including the body (if any), as opposed to the location of its name only.
1616 */
1717class RangeFunction extends Function {
18- predicate hasLocationInfo ( string path , int sl , int sc , int el , int ec ) {
19- super .getLocation ( ) .hasLocationInfo ( path , sl , sc , _, _) and
20- this .getBody ( ) .getLastItem ( ) .getLocation ( ) .hasLocationInfo ( path , _, _, el , ec )
18+ /**
19+ * Holds if this element is at the specified location.
20+ * The location spans column `startcolumn` of line `startline` to
21+ * column `endcolumn` of line `endline` in file `filepath`.
22+ * For more information, see
23+ * [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
24+ */
25+ predicate hasLocationInfo (
26+ string filepath , int startline , int startcolumn , int endline , int endcolumn
27+ ) { super .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , _, _) and
28+ this .getBody ( ) .getLastItem ( ) .getLocation ( ) .hasLocationInfo ( filepath , _, _, endline , endcolumn )
2129 }
2230}
2331
@@ -26,8 +34,16 @@ class RangeFunction extends Function {
2634 * including the body (if any), as opposed to the location of its name only.
2735 */
2836class RangeClass extends Class {
29- predicate hasLocationInfo ( string path , int sl , int sc , int el , int ec ) {
30- super .getLocation ( ) .hasLocationInfo ( path , sl , sc , _, _) and
31- this .getBody ( ) .getLastItem ( ) .getLocation ( ) .hasLocationInfo ( path , _, _, el , ec )
37+ /**
38+ * Holds if this element is at the specified location.
39+ * The location spans column `startcolumn` of line `startline` to
40+ * column `endcolumn` of line `endline` in file `filepath`.
41+ * For more information, see
42+ * [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
43+ */
44+ predicate hasLocationInfo (
45+ string filepath , int startline , int startcolumn , int endline , int endcolumn
46+ ) { super .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , _, _) and
47+ this .getBody ( ) .getLastItem ( ) .getLocation ( ) .hasLocationInfo ( filepath , _, _, endline , endcolumn )
3248 }
3349}
0 commit comments