-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various fixes to C++ domain and format_signatures #377
Conversation
For unknown reasons, in some cases libclang fails to include doc comments in the `Cursor.raw_comment` field when they are present. As a workaround, don't rely on the `Cursor.raw_comment` field and instead parse doc comments from the surrounding tokens directly. This also makes the parsing of the raw comment into doc comments handle the case of mixed doc comment types.
libclang seems to generate UNEXPOSED_DECL cursors for instantiations (not specializations) of variable templates in certain cases/with certain versions of libclang. These cursors result in a JSON entity description that is identical that produced from the cursor corresponding to the original definition. These are now excluded as duplicates based on the assumption that they will occur after the "real" cursor.
When aligning the pre-formatted and post-formatted text, ignore whitespace for better alignment.
Previously, the cppreference data and the json schema data were stored on the `env` object. Data on the `env` object is pickled and sent back separately with every chunk of documents that are processed by a worker process. Only information that relates to the specific documents that have been read should be stored on the `env` object.
Previously, unnamed template parameters were incorrectly assigned a name of `"None"`.
This PR combines a number of independent fixes. Please refer to the independent commit descriptions for details. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
==========================================
+ Coverage 67.19% 76.07% +8.87%
==========================================
Files 68 68
Lines 8515 8598 +83
==========================================
+ Hits 5722 6541 +819
+ Misses 2793 2057 -736 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I wish libclang had a more intuitive way of getting doc comments, but I think that's more the C/C++ language's fault.
:any:
xrefs to C macros