Skip to content

Commit ba05bf3

Browse files
committed
Fix code review findings
1 parent 0defad7 commit ba05bf3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ private module Cached {
837837
)
838838
or
839839
// item = variable in node1 = (..., variable, ...) in a case/is var (..., ...)
840-
exists(PatternExpr pe | pe.getAChild*() = te) and
840+
te = any(PatternExpr pe).getAChildExpr*() and
841841
exists(AssignableDefinitions::LocalVariableDefinition lvd, Ssa::ExplicitDefinition def |
842842
node2.(SsaDefinitionNode).getDefinition() = def and
843843
def.getADefinition() = lvd and

csharp/ql/src/semmle/code/csharp/exprs/Expr.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ class TupleExpr extends Expr, @tuple_expr {
10401040
/** Holds if this expression is a tuple construction. */
10411041
predicate isConstruction() {
10421042
not this = getAnAssignOrForeachChild() and
1043-
not exists(PatternExpr pe | pe.getAChild*() = this)
1043+
not this = any(PatternExpr pe).getAChildExpr*()
10441044
}
10451045

10461046
override string getAPrimaryQlClass() { result = "TupleExpr" }

0 commit comments

Comments
 (0)