Skip to content

[AUTOMATED] Parse C++ pack-size expressions - #4

Merged
mahaloz merged 2 commits into
Noelo-Lab:mainfrom
sjkim1127:codex/cpp-sizeof-pack
Nov 9, 2026
Merged

mahaloz merged 2 commits into
Noelo-Lab:mainfrom
sjkim1127:codex/cpp-sizeof-pack

Conversation

@sjkim1127

Copy link
Copy Markdown

[AUTOMATED]

C++ parameter-pack size expressions such as sizeof...(T) currently fail strict parsing on the ... token. Recognize the parenthesized pack identifier, preserve its spelling, and emit the existing <operator>.sizeOf operator without treating the operand as a runtime call. Keep the inferred type unknown because the parser lacks target-ABI information.

This is independently based on main; it does not depend on #3. The parser still does not prove that the identifier denotes a valid parameter pack, and ordinary pack expansion and full C++ type checking remain outside scope.

Validation:

  • 206 Rust tests passed; fmt and clippy passed. Python: 154 run, 16 skipped in the local environment.
  • Both type- and value-pack examples pass Clang 22 C++11 syntax checks. An identical-input original Joern comparison matches the single function's directed CFG and entry/exit roles. Original Joern labels the expression UnsupportedStmt; this is not a CPG/DDG or semantic parity claim.
  • On eight pinned real Snappy/Ninja translation units, five have 2–20 fewer diagnostics and three are unchanged; no new diagnostics were observed. All eight remain strict rejections for other constructs. Windows, Linux and macOS configurations are included. See docs/eval/cpp_sizeof_pack.md for exact input and executable hashes.

No DecBench pin, score, or benchmark population changed.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:54
@mahaloz
mahaloz merged commit 246e996 into Noelo-Lab:main Nov 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

3 participants