@@ -457,6 +457,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
457457 */
458458 default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
459459
460+ /**
461+ * Like `getASelectedSourceLocation`, but only has to get a location _containing_ the
462+ * actual location associated with `source`.
463+ *
464+ * This prunes fewer sources than `getASelectedSourceLocation` but leaves room for the possibility
465+ * that a more precise location can be selected in the query.
466+ */
467+ default Location getASelectedSourceLocationApprox ( Node source ) { none ( ) }
468+
460469 /**
461470 * Gets a location that will be associated with the given `sink` in a
462471 * diff-informed query that uses this configuration (see
@@ -467,6 +476,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
467476 * report the sink at all, this predicate can be `none()`.
468477 */
469478 default Location getASelectedSinkLocation ( Node sink ) { result = sink .getLocation ( ) }
479+
480+ /**
481+ * Like `getASelectedSinkLocation`, but only has to get a location _containing_ the
482+ * actual location associated with `sink`.
483+ *
484+ * This prunes fewer sinks than `getASelectedSinkLocation` but leaves room for the possibility
485+ * that a more precise location can be selected in the query.
486+ */
487+ default Location getASelectedSinkLocationApprox ( Node sink ) { none ( ) }
470488 }
471489
472490 /** An input configuration for data flow using flow state. */
@@ -606,6 +624,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
606624 */
607625 default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
608626
627+ /**
628+ * Like `getASelectedSourceLocation`, but only has to get a location _containing_ the
629+ * actual location associated with `source`.
630+ *
631+ * This prunes fewer sources than `getASelectedSourceLocation` but leaves room for the possibility
632+ * that a more precise location can be selected in the query.
633+ */
634+ default Location getASelectedSourceLocationApprox ( Node source ) { none ( ) }
635+
609636 /**
610637 * Gets a location that will be associated with the given `sink` in a
611638 * diff-informed query that uses this configuration (see
@@ -616,6 +643,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
616643 * report the sink at all, this predicate can be `none()`.
617644 */
618645 default Location getASelectedSinkLocation ( Node sink ) { result = sink .getLocation ( ) }
646+
647+ /**
648+ * Like `getASelectedSinkLocation`, but only has to get a location _containing_ the
649+ * actual location associated with `sink`.
650+ *
651+ * This prunes fewer sinks than `getASelectedSinkLocation` but leaves room for the possibility
652+ * that a more precise location can be selected in the query.
653+ */
654+ default Location getASelectedSinkLocationApprox ( Node sink ) { none ( ) }
619655 }
620656}
621657
0 commit comments