@@ -2,11 +2,8 @@ private import codeql.ssa.Ssa as SsaImplCommon
22private import semmle.code.cpp.ir.IR
33private import DataFlowUtil
44private import DataFlowImplCommon as DataFlowImplCommon
5- private import semmle.code.cpp.ir.dataflow.internal.ModelUtil
65private import semmle.code.cpp.models.interfaces.Allocation as Alloc
76private import semmle.code.cpp.models.interfaces.DataFlow as DataFlow
8- private import semmle.code.cpp.models.interfaces.FlowOutBarrier as FOB
9- private import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs as FIO
107private import semmle.code.cpp.ir.internal.IRCppLanguage
118private import DataFlowPrivate
129private import ssa0.SsaInternals as SsaInternals0
@@ -797,30 +794,10 @@ private Node getAPriorDefinition(SsaDefOrUse defOrUse) {
797794 )
798795}
799796
800- /**
801- * Holds if there should not be use-use flow out of `n` (or a conversion that
802- * flows to `n`).
803- */
804- private predicate modeledFlowBarrier ( Node n ) {
805- exists ( FIO:: FunctionInput input , CallInstruction call |
806- call .getStaticCallTarget ( ) .( FOB:: FlowOutBarrierFunction ) .isFlowOutBarrier ( input ) and
807- n = callInput ( call , input )
808- )
809- or
810- exists ( Operand operand , Instruction instr , Node n0 , int indirectionIndex |
811- modeledFlowBarrier ( n0 ) and
812- nodeHasInstruction ( n0 , instr , indirectionIndex ) and
813- conversionFlow ( operand , instr , false , _) and
814- nodeHasOperand ( n , operand , indirectionIndex )
815- )
816- }
817-
818797/** Holds if there is def-use or use-use flow from `nodeFrom` to `nodeTo`. */
819798predicate ssaFlow ( Node nodeFrom , Node nodeTo ) {
820799 exists ( Node nFrom , boolean uncertain , SsaDefOrUse defOrUse |
821- ssaFlowImpl ( defOrUse , nFrom , nodeTo , uncertain ) and
822- not modeledFlowBarrier ( nFrom ) and
823- nodeFrom != nodeTo
800+ ssaFlowImpl ( defOrUse , nFrom , nodeTo , uncertain ) and nodeFrom != nodeTo
824801 |
825802 if uncertain = true then nodeFrom = [ nFrom , getAPriorDefinition ( defOrUse ) ] else nodeFrom = nFrom
826803 )
0 commit comments