Skip to content

Commit 348d64d

Browse files
committed
CPP: Layout.
1 parent 4843c73 commit 348d64d

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -545,20 +545,19 @@ private predicate exprToExprStep_nocfg(Expr fromExpr, Expr toExpr) {
545545
// `ClassAggregateLiteral` (`{ capture1, ..., captureN }`).
546546
toExpr.(LambdaExpression).getInitializer() = fromExpr
547547
or
548-
exists(Call call, DataFlowFunction f, FunctionInput inModel, FunctionOutput outModel |
549-
call.getTarget() = f and
550-
f.hasDataFlow(inModel, outModel) and
551-
(
548+
toExpr = any(Call call |
549+
exists(DataFlowFunction f, FunctionInput inModel, FunctionOutput outModel |
550+
call.getTarget() = f and
551+
f.hasDataFlow(inModel, outModel) and
552+
outModel.isOutReturnValue()
553+
|
552554
exists(int argInIndex |
553555
inModel.isInParameter(argInIndex) and
554556
fromExpr = call.getArgument(argInIndex)
555-
) or (
556-
inModel.isInQualifier() and
557-
fromExpr = call.getQualifier()
558557
)
559-
) and (
560-
outModel.isOutReturnValue() and
561-
toExpr = call
558+
or
559+
inModel.isInQualifier() and
560+
fromExpr = call.getQualifier()
562561
)
563562
)
564563
}

0 commit comments

Comments
 (0)