Skip to content

Remove switch statements in PreorderAST methods #1032

@secure-sw-dev-bot

Description

@secure-sw-dev-bot

This issue was copied from checkedc/checkedc-clang#1032


PR #1030 introduces three new Node subclasses to PreorderAST: UnaryOperatorNode, MemberNode, and ImplicitCastNode. These node kinds all have class-specific behavior for PreorderAST methods such as Compare, CompareNodes, Coalesce, Sort, and ConstantFold, and these methods currently use switch statements based on the kind of the Node * argument. These methods should be moved into their respective Node classes so that PreorderAST can simply call N->Sort(), etc. for a Node *N.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions