File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
shared/controlflow/codeql/controlflow Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ module Make<
297297 */
298298 predicate isIntRange ( int bound , boolean upper ) { this = TIntRange ( bound , upper ) }
299299
300- /** Holds if this value represents throwing an exception. */
300+ /** Holds if this value represents throwing an exception (or exiting) . */
301301 predicate isThrowsException ( ) { this = TException ( true ) }
302302
303303 /** Gets a textual representation of this value. */
@@ -368,12 +368,19 @@ module Make<
368368 e instanceof NonNullExpr and v .isNonNullValue ( )
369369 }
370370
371+ /** Holds if `t` is an exception-like successor type. */
372+ private predicate exceptionLike ( SuccessorType t ) {
373+ t instanceof ExceptionSuccessor or
374+ t instanceof ExitSuccessor
375+ }
376+
371377 private predicate exceptionBranchPoint ( BasicBlock bb1 , BasicBlock normalSucc , BasicBlock excSucc ) {
372- exists ( SuccessorType norm , ExceptionSuccessor exc |
378+ exists ( SuccessorType norm , SuccessorType exc |
373379 bb1 .getASuccessor ( norm ) = normalSucc and
374380 bb1 .getASuccessor ( exc ) = excSucc and
375381 normalSucc != excSucc and
376- not norm instanceof ExceptionSuccessor
382+ exceptionLike ( exc ) and
383+ not exceptionLike ( norm )
377384 )
378385 }
379386
You can’t perform that action at this time.
0 commit comments