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
Doxygen won't document functions after #define'd numerical literals with ' separator #9824
Comments
With the current master (1.9.7 (aed5276)) I can reproduce the problem as described. |
My apologies, I forgot to add the output of by
where They are irrelevant but I wanted to show all the fixes I tried on the client side to see if there was a simple fix. |
@doxygen
In a draft 2017 standard (N4659.pdf) I see the "explanation":
In the draft 20xx (N4901.pdf) I see:
An integral literal can, of course, occur at many places in a source and in (probably) many cases this can lead to problems when there is an odd number of single quotes. (in case of |
Describe the bug
Under standard circumstances (explained later) if there is a #define of a numeric literal followed by a documented function, said function will not be documented.
Example:
Mitigating Circumstances:
If
ENABLE_PREPROCESSING = NO
this works but it doesn't if it's set toYES
even withMACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
andPREDEFINED = .......
There is also a weird case with commenting out the #define (when there are others above with the ' separators) as long as it looks like a doc comment (however this doesn't work with just a random doc in-between); however this is difficult to reproduce and so hacky I cant imagine it's too relevant.
Expected behavior
This should be documented as if the #define did not use the ' as this is now legal as of C++14; from cppreference.com "Optional single quotes (') may be inserted between the digits as a separator. They are ignored by the compiler." (see: https://en.cppreference.com/w/cpp/language/integer_literal)
Version
doxygen (via CMAKE) on Windows 10, 64 bit
Additional context
Ordinarily I dislike using ' in integer literals however there are cases (such as aligning hexadecimal digits for masks and shifts) where it can be useful
The text was updated successfully, but these errors were encountered: