File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
cpp/ql/lib/semmle/code/cpp/controlflow Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,15 @@ private module LogicInput_v1 implements GuardsImpl::LogicInputSig {
434434 predicate additionalImpliesStep (
435435 GuardsImpl:: PreGuard g1 , GuardValue v1 , GuardsImpl:: PreGuard g2 , GuardValue v2
436436 ) {
437+ // The `ConditionalBranch` instruction is the instruction for which there are
438+ // conditional successors out of. However, the condition that controls
439+ // which conditional successor is taken is given by the condition of the
440+ // `ConditionalBranch` instruction. So this step either needs to be here,
441+ // or we need `ConditionalBranch` instructions to be `IdExpr`s. Modeling
442+ // them as `IdExpr`s would be a bit weird since the result type is
443+ // `IRVoidType`. Including them here is fine as long as `ConditionalBranch`
444+ // instructions cannot be assigned to SSA variables (which they cannot
445+ // since they produce no value).
437446 g1 .( ConditionalBranchInstruction ) .getCondition ( ) = g2 and
438447 v1 .asBooleanValue ( ) = v2 .asBooleanValue ( )
439448 }
You can’t perform that action at this time.
0 commit comments