Skip to content

[c2cpg] Emit empty block for null-statement bodies in control structures#6081

Merged
max-leuthaeuser merged 1 commit into
masterfrom
max/c2cpg-empty-body-null-statement
Jul 7, 2026
Merged

[c2cpg] Emit empty block for null-statement bodies in control structures#6081
max-leuthaeuser merged 1 commit into
masterfrom
max/c2cpg-empty-body-null-statement

Conversation

@max-leuthaeuser

@max-leuthaeuser max-leuthaeuser commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

if (cond);, for (...);, and while (cond); have an IASTNullStatement as body. Previously nullSafeAst returned Seq.empty for these, leaving required TRUE_BODY/FOR_BODY/DO_BODY edges absent and failing V3 validation.

Enables V3 validation on the CS side of things.

`if (cond);`, `for (...);`, and `while (cond);` have an IASTNullStatement
as body. Previously nullSafeAst returned Seq.empty for these, leaving
required TRUE_BODY/FOR_BODY/DO_BODY edges absent and failing v3 validation.
@max-leuthaeuser max-leuthaeuser requested review from maltek and ml86 July 7, 2026 10:32
@max-leuthaeuser max-leuthaeuser merged commit a879ce0 into master Jul 7, 2026
8 checks passed
@max-leuthaeuser max-leuthaeuser deleted the max/c2cpg-empty-body-null-statement branch July 7, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants