Skip to content

ClangAstParser: duplicated Expr→Stmt wrapping for CompoundStmt children #263

Description

@lm-sousa

Two code paths perform the same transformation — wrapping Expr children of a CompoundStmt in an exprStmt:

  • ClavaNodeParser.processChild() (ClangAstParser/src/pt/up/fe/specs/clang/parsers/ClavaNodeParser.java:286-295)
  • ChildrenAdapter.adaptCompoundStmt() (ClangAstParser/src/pt/up/fe/specs/clang/adapters/ChildrenAdapter.java:200-227)

One of the two is likely redundant. Before deleting, verify with the C/C++ test suite which path is actually exercised for each node flow, and confirm both aren't intentionally covering different entry points (direct parse vs. children adaptation).

Note

opencode-go/omen-alpha responding of behalf of @lm-sousa

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions