Dataflow: Rename prunedViableImplInCallContextReverse to viableImplCallContextReducedReverse.

This commit is contained in:
Anders Schack-Mulligen
2024-05-01 16:04:28 +02:00
parent 0561c65b61
commit 740bb84423
2 changed files with 6 additions and 14 deletions

View File

@@ -2554,10 +2554,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
private signature module Level1CallContextInputSig {
predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call);
DataFlowCall prunedViableImplInCallContextReverse(
DataFlowCallable callable, CallContextReturn ctx
);
}
private module Level1CallContext<Level1CallContextInputSig Input> {
@@ -2574,10 +2570,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
CcCall ccSomeCall() { result instanceof CallContextSomeCall }
DataFlowCall viableImplCallContextReducedReverse(DataFlowCallable c, CcNoCall ctx) {
result = Input::prunedViableImplInCallContextReverse(c, ctx)
}
predicate viableImplNotCallContextReducedReverse(CcNoCall ctx) {
ctx instanceof CallContextAny
}

View File

@@ -582,8 +582,8 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
* the possible call sites are restricted.
*/
pragma[nomagic]
DataFlowCall prunedViableImplInCallContextReverse(
DataFlowCallable callable, CallContextReturn ctx
DataFlowCall viableImplCallContextReducedReverse(
DataFlowCallable callable, CallContextNoCall ctx
) {
exists(DataFlowCallable c0, DataFlowCall call0 |
callEnclosingCallable(call0, callable) and
@@ -600,7 +600,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
predicate resolveReturn(CallContextNoCall cc, DataFlowCallable callable, DataFlowCall call) {
cc instanceof CallContextAny and relevantCallEdgeOut(call, callable)
or
call = prunedViableImplInCallContextReverse(callable, cc)
call = viableImplCallContextReducedReverse(callable, cc)
}
/** Gets the call context when returning from `c` to `call`. */
@@ -888,10 +888,10 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
}
cached
DataFlowCall prunedViableImplInCallContextReverse(
DataFlowCallable callable, CallContextReturn ctx
DataFlowCall viableImplCallContextReducedReverse(
DataFlowCallable callable, CallContextNoCall ctx
) {
result = Impl2::prunedViableImplInCallContextReverse(callable, ctx)
result = Impl2::viableImplCallContextReducedReverse(callable, ctx)
}
}