mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
C#: Remove references to getAFirstReadAtNode.
This commit is contained in:
@@ -500,11 +500,7 @@ class AssignableDefinition extends TAssignableDefinition {
|
||||
*/
|
||||
pragma[nomagic]
|
||||
AssignableRead getAFirstRead() {
|
||||
exists(ControlFlowNode cfn | cfn = result.getControlFlowNode() |
|
||||
exists(Ssa::ExplicitDefinition def | result = def.getAFirstReadAtNode(cfn) |
|
||||
this = def.getADefinition()
|
||||
)
|
||||
)
|
||||
exists(Ssa::ExplicitDefinition def | result = def.getAFirstRead() | this = def.getADefinition())
|
||||
}
|
||||
|
||||
/** Gets a textual representation of this assignable definition. */
|
||||
|
||||
@@ -241,7 +241,7 @@ private Ssa::Definition getAnUltimateDefinition(Ssa::Definition def) {
|
||||
* exception.
|
||||
*/
|
||||
private predicate defReaches(Ssa::Definition def, ControlFlowNode cfn) {
|
||||
exists(def.getAFirstReadAtNode(cfn))
|
||||
def.getAFirstRead().getControlFlowNode() = cfn
|
||||
or
|
||||
exists(ControlFlowNode mid | defReaches(def, mid) |
|
||||
SsaImpl::adjacentReadPairSameVar(_, mid, cfn) and
|
||||
|
||||
Reference in New Issue
Block a user