Skip to content

fix(cpp): extract declarations in guarded hh headers - #717

Open
xiehuanyi wants to merge 1 commit into
Egonex-AI:mainfrom
xiehuanyi:fix/cpp-guarded-hh-headers-20261007
Open

xiehuanyi wants to merge 1 commit into
Egonex-AI:mainfrom
xiehuanyi:fix/cpp-guarded-hh-headers-20261007

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

Summary

C++ headers using .hh now select the C++ language in both the scanner and core registry. Structural extraction walks preprocessor conditionals, so classes, methods, functions and includes inside classic include guards or conditional branches are retained. Conditional branches are analyzed without evaluating compile-time flags, matching static analysis.

Linked issue(s)

Closes #710.

How I tested this

Added regressions for a guarded .hh header with a namespace/class/method/include, #if/#elif/#else function branches, and .hh scanner classification.

  • pnpm lint
  • pnpm --filter @understand-anything/core test — 47 files, 1,015 tests passed
  • pnpm test — 39 files, 794 tests passed, 4 skipped
  • pnpm build — all workspace packages built
  • Scanner-focused suite — 41 tests passed

Versioning

  • Version bumped from 2.9.7 to 2.9.8 in all six manifests listed in CLAUDE.md (the template still says five).

AI assistance: prepared with Codex and verified against the scanner, actual C++ grammar trees, and regression tests.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 10:38

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 reached their quota limit.

This branch has not been deployed

No deployments
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.

C++: .hh headers not recognized, and declarations inside #ifndef include guards are not extracted

2 participants