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. */
@@ -362,12 +362,19 @@ module Make<
362362 v .asConstantValue ( ) = c .asConstantValue ( )
363363 }
364364
365+ /** Holds if `t` is an exception-like successor type. */
366+ private predicate exceptionLike ( SuccessorType t ) {
367+ t instanceof ExceptionSuccessor or
368+ t instanceof ExitSuccessor
369+ }
370+
365371 private predicate exceptionBranchPoint ( BasicBlock bb1 , BasicBlock normalSucc , BasicBlock excSucc ) {
366- exists ( SuccessorType norm , ExceptionSuccessor exc |
372+ exists ( SuccessorType norm , SuccessorType exc |
367373 bb1 .getASuccessor ( norm ) = normalSucc and
368374 bb1 .getASuccessor ( exc ) = excSucc and
369375 normalSucc != excSucc and
370- not norm instanceof ExceptionSuccessor
376+ exceptionLike ( exc ) and
377+ not exceptionLike ( norm )
371378 )
372379 }
373380
You can’t perform that action at this time.
0 commit comments