Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1cc2cc

Browse files
committed
Remove code duplication
1 parent 5157236 commit d1cc2cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

csharp/ql/src/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module ControlFlowTree {
6262
Range() { this = getAChild*(any(CfgScope scope)) }
6363
}
6464

65-
private Element getAChild(Element p) {
65+
Element getAChild(Element p) {
6666
result = p.getAChild() or
6767
result = p.(AssignOperation).getExpandedAssignment()
6868
}
@@ -1334,7 +1334,7 @@ module Statements {
13341334
/** Gets a child of `cfe` that is in CFG scope `scope`. */
13351335
pragma[noinline]
13361336
private ControlFlowElement getAChildInScope(ControlFlowElement cfe, Callable scope) {
1337-
result = [cfe.getAChild(), cfe.(AssignOperation).getExpandedAssignment()] and
1337+
result = ControlFlowTree::getAChild(cfe) and
13381338
scope = result.getEnclosingCallable()
13391339
}
13401340

0 commit comments

Comments
 (0)