Skip to content

Commit d3530b0

Browse files
committed
C#: Re-factor nested exists into a single exists.
1 parent c49a16c commit d3530b0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,11 @@ module LocalFlow {
423423
ControlFlow::Nodes::ExprNode getAPostUpdateNodeForArg(ControlFlow::Nodes::ExprNode arg) {
424424
arg.getExpr() instanceof Argument and
425425
result = getALastEvalNode*(arg) and
426-
exists(Expr e | result.getExpr() = e |
427-
exists(Type t | t = e.stripCasts().getType() |
428-
t instanceof RefType and
429-
not t instanceof NullType
430-
or
431-
t = any(TypeParameter tp | not tp.isValueType())
432-
)
426+
exists(Expr e, Type t | result.getExpr() = e and t = e.stripCasts().getType() |
427+
t instanceof RefType and
428+
not t instanceof NullType
429+
or
430+
t = any(TypeParameter tp | not tp.isValueType())
433431
) and
434432
not exists(getALastEvalNode(result))
435433
}

0 commit comments

Comments
 (0)