@@ -459,6 +459,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
459459 */
460460 default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
461461
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+
462471 /**
463472 * Gets a location that will be associated with the given `sink` in a
464473 * diff-informed query that uses this configuration (see
@@ -469,6 +478,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
469478 * report the sink at all, this predicate can be `none()`.
470479 */
471480 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 ( ) }
472490 }
473491
474492 /** An input configuration for data flow using flow state. */
@@ -608,6 +626,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
608626 */
609627 default Location getASelectedSourceLocation ( Node source ) { result = source .getLocation ( ) }
610628
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+
611638 /**
612639 * Gets a location that will be associated with the given `sink` in a
613640 * diff-informed query that uses this configuration (see
@@ -618,6 +645,15 @@ module Configs<LocationSig Location, InputSig<Location> Lang> {
618645 * report the sink at all, this predicate can be `none()`.
619646 */
620647 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 ( ) }
621657 }
622658}
623659
0 commit comments