Skip to content

Commit 9e4f4fa

Browse files
committed
Improve predicate names
1 parent b1e254e commit 9e4f4fa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private newtype TNode =
1212
MkGlobalFunctionNode(Function f) or
1313
MkImplicitVarargsSlice(CallExpr c) { c.hasImplicitVarargs() } or
1414
MkFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) or
15-
MkPostUpdateNode(IR::Instruction insn) { insn = updatedInstruction() }
15+
MkPostUpdateNode(IR::Instruction insn) { insn = getAnUpdatedInstruction() }
1616

1717
private IR::Instruction getADirectlyWrittenInstruction() {
1818
exists(IR::WriteTarget target, IR::Instruction base |
@@ -26,7 +26,7 @@ private IR::Instruction getADirectlyWrittenInstruction() {
2626
result = IR::evalExprInstruction(any(SendStmt s).getChannel())
2727
}
2828

29-
private IR::Instruction getAccessPathPredecessor2(IR::Instruction insn) {
29+
private IR::Instruction getAccessPathPredecessor(IR::Instruction insn) {
3030
exists(Expr e | result = IR::evalExprInstruction(e) |
3131
e = insn.(IR::EvalInstruction).getExpr().(UnaryExpr).getOperand()
3232
or
@@ -39,16 +39,16 @@ private IR::Instruction getAccessPathPredecessor2(IR::Instruction insn) {
3939
}
4040

4141
private IR::Instruction getAWrittenInstruction() {
42-
result = getAccessPathPredecessor2*(getADirectlyWrittenInstruction())
42+
result = getAccessPathPredecessor*(getADirectlyWrittenInstruction())
4343
}
4444

45-
private IR::Instruction updatedInstruction() {
46-
result = IR::evalExprInstruction(updatedExpr()) or
45+
private IR::Instruction getAnUpdatedInstruction() {
46+
result = IR::evalExprInstruction(getAnUpdatedExpr()) or
4747
result instanceof IR::EvalImplicitDerefInstruction or
4848
result = getAWrittenInstruction()
4949
}
5050

51-
private Expr updatedExpr() {
51+
private Expr getAnUpdatedExpr() {
5252
result instanceof AddressExpr
5353
or
5454
result = any(AddressExpr e).getOperand()
@@ -769,7 +769,7 @@ module Public {
769769
}
770770

771771
private class UpdateNode extends InstructionNode {
772-
UpdateNode() { insn = updatedInstruction() }
772+
UpdateNode() { insn = getAnUpdatedInstruction() }
773773
}
774774

775775
/**

0 commit comments

Comments
 (0)