Skip to content

Commit

Permalink
Merge pull request #18457 from hvitved/dataflow/disallowed-return-inl…
Browse files Browse the repository at this point in the history
…ine-late

Data flow: Fix a bad join order
  • Loading branch information
hvitved authored Jan 10, 2025
2 parents 204afab + 91b6a65 commit 039b2ec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -595,12 +595,18 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
}

pragma[nomagic]
private ReturnKindExtOption getDisallowedReturnKind(ParamNodeEx p) {
private ReturnKindExtOption getDisallowedReturnKind0(ParamNodeEx p) {
if allowParameterReturnInSelfEx(p)
then result.isNone()
else p.isParameterOf(_, result.asSome().(ParamUpdateReturnKind).getPosition())
}

bindingset[p]
pragma[inline_late]
private ReturnKindExtOption getDisallowedReturnKind(ParamNodeEx p) {
result = getDisallowedReturnKind0(p)
}

/**
* Holds if an argument to `call` is reached in the flow covered by `fwdFlow`.
*/
Expand Down

0 comments on commit 039b2ec

Please sign in to comment.