Skip to content

Commit 5fe44b6

Browse files
committed
CPP: Avoid CP with edgekind in non-returning analysis
1 parent e208a7a commit 5fe44b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/ReachableBlock.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ predicate isInfeasibleInstructionSuccessor(Instruction instr, EdgeKind kind) {
1111
instr.getSuccessor(kind) instanceof UnreachedInstruction and
1212
kind instanceof GotoEdge
1313
or
14-
isCallToNonReturningFunction(instr)
14+
isCallToNonReturningFunction(instr) and exists(instr.getSuccessor(kind))
1515
}
1616

1717
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlock.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ predicate isInfeasibleInstructionSuccessor(Instruction instr, EdgeKind kind) {
1111
instr.getSuccessor(kind) instanceof UnreachedInstruction and
1212
kind instanceof GotoEdge
1313
or
14-
isCallToNonReturningFunction(instr)
14+
isCallToNonReturningFunction(instr) and exists(instr.getSuccessor(kind))
1515
}
1616

1717
/**

0 commit comments

Comments
 (0)