Skip to content

Unify analyzer exit proofs on exception-aware control-flow traversal #833

Description

@thomhurst

Follow-up to the design review on #803 (Claude review 5969134517).

ScopeWalker now supplements its graph queries with syntax-based reasoning for loop jumps, terminal exits, catch applicability/order, and constant filters. The focused fixes preserve RESP001 disposal and RESP002 flush behavior, but each new control-flow shape needs additional syntax rules.

Move these proofs onto a shared traversal that models Roslyn control-flow branches together with exception-handling regions and finally continuations. This is an architectural follow-up rather than part of the original #107 loop/switch/coalescing repairs. The current graph traversal already supplies inclusive-start and finally-continuation queries; catch dispatch and correlated branch constraints must be represented before replacing the conservative helpers.

Acceptance criteria:

  • Distinguish paths requiring disposal from paths that cannot reach a pending read.
  • Model break/continue, return/throw, yield, goto, catch type/filter/order, rethrow, and finally execution without relying solely on lexical spans.
  • Preserve all analyzer regressions, including retained versus recreated pending values across loop iterations and generic exception constraints.
  • Replace conservative local-goto warnings only where graph evidence proves safety; add positive and negative controls.
  • Keep analysis intra-scope and bounded; validate the full analyzer suite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions