Repository navigation
Fix C++ API doc comments for ConstValueImpl and ConstValueInfoImpl - #33604
Open
Jooyoung Lim (mmporong) wants to merge 1 commit into
Open
Jooyoung Lim (mmporong) wants to merge 1 commit into
Jooyoung Lim (mmporong) wants to merge 1 commit into
Conversation
Doxygen only treats "///<" as a trailing comment for the member on the same line. Several comments in onnxruntime_cxx_api.h used the marker wrongly, so the generated docs attached text to the wrong member or kept a stray "<": - ConstValueImpl::HasValue() used "/// <", which became the description of GetCount(), and HasValue was left undocumented. GetCount() used a plain "//" comment that never reached the docs. - ConstValueInfoImpl used "/// < ..." on its own line before each member, so every description started with "<", and the standalone "///< Wraps OrtApi::ValueInfo_GetProducerNode" was attached to the previous member TypeInfo(), leaving GetProducerNode() undocumented. Use "///<" for the trailing comments and "///" for the leading ones. Fixes microsoft#20931 Assisted-by: Claude:claude-opus-5-5
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The comment-only changes correct documentation attachment without affecting API compatibility or executable behavior.
No open issues 🎉
What changed in this PR
Corrects Doxygen comment attachment in ONNX Runtime’s C++ API header, addressing #20931 without changing API signatures or runtime behavior.
Changes:
- Fixes trailing documentation markers for
HasValue()andGetCount(). - Corrects leading documentation markers in
ConstValueInfoImpl, removing stray<characters and attaching descriptions to the intended members.
No actionable findings remain.
| File | Description |
|---|---|
include/onnxruntime/core/session/onnxruntime_cxx_api.h |
Corrects documentation markers and slightly shortens the GetCount() description. |
Review effort: Balanced
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
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.
Description
Fix Doxygen comment markers in
onnxruntime_cxx_api.hthat attach descriptions to the wrong member. Doxygen only treats///<as a trailing comment for the member on the same line:Ort::detail::ConstValueImpl::HasValue()used/// < ...(with a space), which Doxygen reads as a leading comment for the next declaration, so theHasValuetext showed up underGetCount()andHasValuehad no description.GetCount()used a plain//comment, so its own description never reached the docs. Both now use///<. TheGetCount()wording is shortened slightly ("the element count") to keep the line within 120 columns.Ort::detail::ConstValueInfoImplused/// < ...on its own line before each member, so every description started with a stray<, and the standalone///< Wraps OrtApi::ValueInfo_GetProducerNodewas attached to the previous memberTypeInfo()as its detailed description, leavingGetProducerNode()undocumented. These leading comments now use///.Comment-only change; no code or build impact.
Generated XML, Doxygen 1.9.8 (the version used by
publish-c-apidocs.yml) withdocs/c_cxx/Doxyfileand its inputs:ConstValueImpl::HasValueConstValueImpl::GetCountConstValueInfoImpl::GetName(and 9 moreA wrapper around ...members)ConstValueInfoImpl::TypeInfoConstValueInfoImpl::GetProducerNodeOnly the
ConstValueImplandConstValueInfoImplXML (and the header's source listing) changed. The Doxygen warning log is the same before and after (the two existing@param 'format'warnings forORT_CXX_LOGF/ORT_CXX_LOGF_NOEXCEPT).clang-format --style=file --dry-run -Werrorpasses on the file.Motivation and Context
Fixes #20931. The issue screenshot shows the
GetCount()page with "< Return true if OrtValue contains data and returns false if the OrtValue is a None", which is theHasValue()comment, leading<included. A project contributor noted in the thread that the comment is incorrect and should be updated. TheConstValueInfoImplcomments have the same marker problem, so they are fixed here as well.AI assistance: this change was prepared with Claude (claude-opus-5-5), which located the cause, made the edit, ran the Doxygen before/after comparison, and drafted this description.