@@ -459,6 +459,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
459
459
*/
460
460
default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
461
461
462
+ /**
463
+ * Like `getASelectedSourceLocation`, but only has to get a location _containing_ the
464
+ * actual location associated with `source`.
465
+ *
466
+ * This prunes fewer sources than `getASelectedSourceLocation` but leaves room for the possibility
467
+ * that a more precise location can be selected in the query.
468
+ */
469
+ default Location getASelectedSourceLocationApprox ( Node source ) { none ( ) }
470
+
462
471
/**
463
472
* Gets a location that will be associated with the given `sink` in a
464
473
* diff-informed query that uses this configuration (see
@@ -469,6 +478,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
469
478
* report the sink at all, this predicate can be `none()`.
470
479
*/
471
480
default Location getASelectedSinkLocation ( Node sink ) { result = sink .getLocation ( ) }
481
+
482
+ /**
483
+ * Like `getASelectedSinkLocation`, but only has to get a location _containing_ the
484
+ * actual location associated with `sink`.
485
+ *
486
+ * This prunes fewer sinks than `getASelectedSinkLocation` but leaves room for the possibility
487
+ * that a more precise location can be selected in the query.
488
+ */
489
+ default Location getASelectedSinkLocationApprox ( Node sink ) { none ( ) }
472
490
}
473
491
474
492
/** An input configuration for data flow using flow state. */
@@ -608,6 +626,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
608
626
*/
609
627
default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
610
628
629
+ /**
630
+ * Like `getASelectedSourceLocation`, but only has to get a location _containing_ the
631
+ * actual location associated with `source`.
632
+ *
633
+ * This prunes fewer sources than `getASelectedSourceLocation` but leaves room for the possibility
634
+ * that a more precise location can be selected in the query.
635
+ */
636
+ default Location getASelectedSourceLocationApprox ( Node source ) { none ( ) }
637
+
611
638
/**
612
639
* Gets a location that will be associated with the given `sink` in a
613
640
* diff-informed query that uses this configuration (see
@@ -618,6 +645,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
618
645
* report the sink at all, this predicate can be `none()`.
619
646
*/
620
647
default Location getASelectedSinkLocation ( Node sink ) { result = sink .getLocation ( ) }
648
+
649
+ /**
650
+ * Like `getASelectedSinkLocation`, but only has to get a location _containing_ the
651
+ * actual location associated with `sink`.
652
+ *
653
+ * This prunes fewer sinks than `getASelectedSinkLocation` but leaves room for the possibility
654
+ * that a more precise location can be selected in the query.
655
+ */
656
+ default Location getASelectedSinkLocationApprox ( Node sink ) { none ( ) }
621
657
}
622
658
}
623
659
0 commit comments