SuccessorType: Address review comments.

This commit is contained in:
Anders Schack-Mulligen
2025-09-02 11:10:00 +02:00
parent 4e70627629
commit 3d4d347150
4 changed files with 50 additions and 54 deletions

View File

@@ -470,12 +470,9 @@ module FinallySplitting {
* then the `finally` block must end with a `return` as well (provided that
* the `finally` block exits normally).
*/
class FinallySplitType instanceof Cfg::SuccessorType {
class FinallySplitType extends Cfg::SuccessorType {
FinallySplitType() { not this instanceof Cfg::ConditionalSuccessor }
/** Gets a textual representation of this successor type. */
string toString() { result = super.toString() }
/** Holds if this split type matches entry into a `finally` block with completion `c`. */
predicate isSplitForEntryCompletion(Completion c) {
if c instanceof NormalCompletion