Repository navigation
[AUTOMATED] Parse qualified C++ template and operator-function names - #3
Merged
mahaloz merged 30 commits intoNov 9, 2026
Merged
Conversation
sjkim1127
marked this pull request as ready for review
October 27, 2026 11:38
[AUTOMATED] Share parser-local scope maps until mutation, preserving nested shadowing and existing graph output.
[AUTOMATED] Preserve explicit constructor and destructor bodies when owner names match, while retaining unsupported initializer diagnostics.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Keep the GNU case-range operator in the generated table, and the C++ pack-size spelling in the lexical bridge, so the operator port does not change either. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Every other restorable divergence has a joern_* option that original-reference comparisons request. Add joern_cpp_control_flow for the C++ evaluation-order fixes, starting with noexcept operands. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Keep the lowering this change replaced, so original-reference comparisons can still request it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKNTKZkNX6ZRBmB96eA
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[AUTOMATED]
Current-head verification (2026-10-27)
Rechecked PR head
3f0a618567a94701f2ace8fbc49af97063fc643fagainst upstream base9f8cad170d6b6883fe08627fa524ecb28128380d. Rust: 221 tests passed; formatting and clippy with warnings denied passed. Python: 155 tests run, 16 skipped in the local environment. A fresh capture from unchanged PyJoern 4.0.150.4 / Joern 4.0.150 across the eight checked-in C++ inputs matched directed CFG topology, entry/exit roles, and degeneracy for 22/22 exported functions. This does not establish CPG label, type, effect or execution parity. No remote CI checks are currently reported for this head.Additional fixed-input diagnostic audit: all eight sampled whole TUs remain strict rejections both before and after. In the Windows MinGW Snappy TU the diagnostic count changes from 334 to 418; 164 diagnostics appear and 80 disappear, including 111 newly reported unsupported constructor-initializer diagnostics. This may reflect newly recognized syntax as well as changed recovery; it is not yet a proven improvement or regression in semantic completeness. The other sampled inputs and full diagnostic multisets were retained locally. This audit does not replace the earlier saved-output replay or establish compiler-validity/CFG parity for these whole TUs.
Operator-template follow-up (base
52a8899, 2026-10-22)Preserve calls, returns and comma/short-circuit condition operands for explicit
operator-template calls such as
operator!=<>(a,b)andbox.template operator()<int>(). The expression scanner and recovery checksnow use the same name boundary. C++ call leaf extraction also ignores
::inside template arguments instead of renaming a call to an argument's type.
default loop-option changes, compiler repair or DecBench pin/profile changes.
Clippy with warnings denied, fmt and diff checks pass.
(four hardcoded sibling-checkout requirements and one platform library-discovery
requirement). DecBench focused experimental C++ lane against this library:
316 passed /5 platform skips. Full DecBench tests are not rerun.
Clang 22 (
-pedantic-errors -fsyntax-only). All seven selectedfgraphsmatch unchanged original Joern in directed topology, entry/exit roles and
degeneracy after correction; five did not match before. Auxiliary operator
declaration export-name differences remain in some controls, so this is not
all-export or full-CPG parity. Two new source/reference fixtures bring the
retained full selected-function fixture suite to 8 inputs /22 functions.
source/producer inputs, 993 unchanged CPGs, 26 rejected by both,
7 changed CPGs (all producer-side), zero parse-success losses or definition-set
changes. Six changed CPGs retain CFG topology/roles/degeneracy; one changes
as previously dropped calls/conditions are retained.
joern_loop_conditions=Trueexplicitly. The independentupstream constant-true-loop policy is not silently adopted in this audit.
Remaining limits
The existing 87 original-reference inputs remain 82 matches /4 unavailable
exports /1 mismatch. The one large Ghidra pseudocode CFG was already
non-isomorphic: 194 nodes/289 edges before, 210/313 after, original 199/297.
The full input is not qualified as complete valid C++; preserving its calls
is not certified recovery parity or an eligibility decision. These limits are
recorded in
docs/divergences.mdanddocs/eval/cpp-operator-templates.md.The historical 8,808-case audit and full 250-function metric evaluation are
not rerun here. No fresh score, official C++ admission, execution parity or
ranking improvement is claimed. DecBench joernio#103's production pin, cache
versions, profiles and published results are unchanged. This PR stays draft;
parser adoption still needs separate metric/loop-policy and qualification review.
No GitHub checks are currently reported for this branch; local verification is
not remote CI green.
Earlier revision (
52a8899)Scope
AI-assisted frontend fix for C++ qualified expression names. This is separate from DecBench metric policy or producer-output validation.
::and operator-function-ids such asoperator[],operator(),operator+, andoperator new.class/default arguments from the actual record introducer.docs/cpp-expression-contract.md.No new dependencies or diagnostic suppression are introduced.
Validation
cargo test --all-targets: 214 passed, including 10 new call/operand/CFG regression tests.unittest discover: successful (Ran 166 tests; OK, skipped=5). Four existing tests require a sibling DecBench checkout at a hardcoded path; one native-DDG audit has platform-specific library discovery.cargo clippy --all-targets -- -D warnings,cargo fmt --all --check, debug and release builds passed locally.-fsyntax-only.Saved-output replay and limits
Against upstream base
9f8cad170d6b6883fe08627fa524ecb28128380d, 1,000 frozen producer outputs (4 tools × 250 fixed requests, 972 nonempty) were parsed with identical prepared bytes:These are frontend availability counts, not valid C++ eligibility or GED scores. Eight of the 39 newly parsed outputs contain already-confirmed angr duplicate-binding defects. The other 31 have not been qualified as complete valid C++. None is admitted into a scoring population; the DecBench dependency pin and metric/Union policies remain unchanged.
Thirty-seven previously available CPGs also change, notably explicit operator calls previously represented as ordinary assignment/allocation expressions. Actual-row CPGs are not claimed to have full original-Joern or execution parity. A repeated release replay matches the debug candidate's complete JSON for all 1,000 inputs; no corpus program or recovered source was executed.
Strict mode rejects reported parser errors, not every C++ syntax, binding or type error. Duplicate declarations, malformed recovery and ABI pseudocode still require caller validation. This draft does not add template instantiation/specialization matching, complete C++ name lookup, or official benchmark admission policy.