mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
SSA: Push includeWriteDefsInFlowStep constraint into newtype.
This commit is contained in:
@@ -1661,7 +1661,16 @@ module Make<LocationSig Location, InputSig<Location> Input> {
|
||||
private newtype TNode =
|
||||
TWriteDefSource(WriteDefinition def) { DfInput::ssaDefHasSource(def) } or
|
||||
TExprNode(DfInput::Expr e, Boolean isPost) { e = DfInput::getARead(_) } or
|
||||
TSsaDefinitionNode(DefinitionExt def) { not phiHasUniqNextNode(def) } or
|
||||
TSsaDefinitionNode(DefinitionExt def) {
|
||||
not phiHasUniqNextNode(def) and
|
||||
if DfInput::includeWriteDefsInFlowStep()
|
||||
then any()
|
||||
else (
|
||||
def instanceof PhiNode or
|
||||
def instanceof PhiReadNode or
|
||||
DfInput::allowFlowIntoUncertainDef(def)
|
||||
)
|
||||
} or
|
||||
TSsaInputNode(SsaPhiExt phi, BasicBlock input) { relevantPhiInputNode(phi, input) }
|
||||
|
||||
/**
|
||||
@@ -1904,14 +1913,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
|
||||
exists(DefinitionExt def |
|
||||
nodeFrom.(SsaDefinitionExtNodeImpl).getDefExt() = def and
|
||||
def.definesAt(v, bb, i, _) and
|
||||
isUseStep = false and
|
||||
if DfInput::includeWriteDefsInFlowStep()
|
||||
then any()
|
||||
else (
|
||||
def instanceof PhiNode or
|
||||
def instanceof PhiReadNode or
|
||||
DfInput::allowFlowIntoUncertainDef(def)
|
||||
)
|
||||
isUseStep = false
|
||||
)
|
||||
or
|
||||
[nodeFrom, nodeFrom.(ExprPostUpdateNode).getPreUpdateNode()].(ReadNode).readsAt(bb, i, v) and
|
||||
|
||||
Reference in New Issue
Block a user