@@ -242,20 +242,44 @@ private newtype TDataFlowCallable =
242
242
TSummarizedCallable ( FlowSummary:: SummarizedCallable c )
243
243
244
244
class DataFlowCallable extends TDataFlowCallable {
245
+ /**
246
+ * Gets the `Callable` corresponding to this `DataFlowCallable`, if any.
247
+ */
245
248
Callable asCallable ( ) { this = TCallable ( result ) }
246
249
250
+ /**
251
+ * Gets the `File` whose root scope corresponds to this `DataFlowCallable`, if any.
252
+ */
247
253
File asFileScope ( ) { this = TFileScope ( result ) }
248
254
255
+ /**
256
+ * Gets the `SummarizedCallable` corresponding to this `DataFlowCallable`, if any.
257
+ */
249
258
FlowSummary:: SummarizedCallable asSummarizedCallable ( ) { this = TSummarizedCallable ( result ) }
250
259
260
+ /**
261
+ * Gets the type of this callable.
262
+ *
263
+ * If this is a `File` root scope, this has no value.
264
+ */
251
265
SignatureType getType ( ) { result = [ this .asCallable ( ) , this .asSummarizedCallable ( ) ] .getType ( ) }
252
266
267
+ /**
268
+ * Gets a string representation of this callable.
269
+ */
253
270
string toString ( ) {
254
271
result = this .asCallable ( ) .toString ( ) or
255
272
result = "File scope: " + this .asFileScope ( ) .toString ( ) or
256
273
result = "Summary: " + this .asSummarizedCallable ( ) .toString ( )
257
274
}
258
275
276
+ /**
277
+ * Holds if this callable is at the specified location.
278
+ * The location spans column `startcolumn` of line `startline` to
279
+ * column `endcolumn` of line `endline` in file `filepath`.
280
+ * For more information, see
281
+ * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
282
+ */
259
283
predicate hasLocationInfo (
260
284
string filepath , int startline , int startcolumn , int endline , int endcolumn
261
285
) {
0 commit comments