Tighten C++ ownership filtering and fix operators page headings#18
Merged
Conversation
Malcolmnixon
commented
Jun 9, 2026
Member
- C++: track explicitly selected headers in ClangAstParser; a symbol is only owned when its defining header is both under a PublicIncludeRoot and explicitly selected via --api-headers. Prevents transitive-include symbols from leaking into generated docs.
- C++ + .NET: capitalize operators page H1 heading to 'Operators' (proper title-cased heading); rename .NET file to Operators.md (PascalCase convention) with updated navigation links and test keys.
- .NET: fix BuildMethodId to normalize nested-type separators ('/' -> '.') in parameter type FullNames, matching the existing return-type fix.
- Reqstream/verification: update cpp-generator docs to reflect new ownership rules and add transitive-include regression test mapping; fix '#include' rendering typo.
- C++: track explicitly selected headers in ClangAstParser; a symbol is
only owned when its defining header is both under a PublicIncludeRoot
and explicitly selected via --api-headers. Prevents transitive-include
symbols from leaking into generated docs.
- C++ + .NET: capitalize operators page H1 heading to 'Operators'
(proper title-cased heading); rename .NET file to Operators.md
(PascalCase convention) with updated navigation links and test keys.
- .NET: fix BuildMethodId to normalize nested-type separators ('/' -> '.')
in parameter type FullNames, matching the existing return-type fix.
- Reqstream/verification: update cpp-generator docs to reflect new
ownership rules and add transitive-include regression test mapping;
fix '#include' rendering typo.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens C++ API ownership so only symbols defined in explicitly selected --api-headers are documented (preventing transitive-include leakage), and aligns “Operators” page presentation across generators while fixing a .NET XML-doc ID normalization edge case.
Changes:
- C++: Track explicitly selected headers in
ClangAstParserand require both PublicIncludeRoot membership and explicit selection for symbol ownership; add regression test and update verification/reqstream docs. - .NET: Rename the per-type operators page to
Operators.md, update links/tests accordingly, and title-case the operators page H1 toOperators. - .NET: Fix
BuildMethodIdto normalize nested-type separators (/→.) in parameter type full names (matching existing return-type behavior).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/ApiMark.DotNet.Tests/DotNetGeneratorTests.cs | Updates expectations/links for Operators.md (PascalCase) in generated output. |
| test/ApiMark.Cpp.Tests/CppGeneratorTests.cs | Adds regression coverage ensuring transitive-include symbols from non-selected headers are excluded. |
| src/ApiMark.DotNet/DotNetGenerator.cs | Renames operators page output and normalizes nested-type separators for XML doc method IDs. |
| src/ApiMark.Cpp/CppGenerator.cs | Title-cases the Operators page H1 headings for class/namespace operator pages. |
| src/ApiMark.Cpp/CppAst/ClangAstParser.cs | Implements explicit-header tracking and updates ownership logic to require explicit selection. |
| docs/verification/api-mark-cpp/cpp-generator.md | Updates verification docs to reflect the new ownership/selection behavior and test mapping. |
| docs/reqstream/api-mark-cpp/cpp-generator.yaml | Updates requirements to reflect header-selection-based ownership and adds the new test mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Restore truncated two-line comments in WriteClassOperatorsPage and WriteNamespaceOperatorsPage (first half was lost when the heading line was inserted above them) - Revert .NET operators page filename from 'Operators' back to 'operators' to avoid collision with a real member named 'Operators'; the H1 heading stays 'Operators' (title-cased) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 15, 2026
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.