In example
#define FOO uint32_t(0x30000000) /*!< Mask A descr. */ #define BAR uint32_t(0x00070000) /*!< Mask B descr */
CC takes description for FOO from BAR. For BAR CC takes no description. All correct when single line comment style used.
using C::B SVN10341 both Windows and Linux
I can confirm this bug, also, see a related discussion here: Code::Blocks / Tickets / #41 CC can`t parse defines with Doxygen single-line comment
It is really hard to determin which is the end of a macro definition in this case, the Ticket 41, I can simply stop reading the macro definition if I meet a C++ style comments, but here, if I see /!< Mask A descr. /, I still need to go further to see whether there are some statement after this C style comment.
This is equally to the code:
I don't know a correct way to fix this issue.
If you write the below code, then the first comment will attach to the aaa token.
I think this patch should fix your prolem, I don't extensivedly tested it, so please test and give feedback, thanks.
Thanks for the patch. Now it looks ok, at least on stm32 includes.
Let's the extensive test starts.
Here is the some results. I found no problems with #defines. But the similar problem with enum's, struct's, union's (incl typedefs) appears after this patch. Members descriptions looks shifted down and 1'st member has an empty description. Tried for both line-style and block-style comments.
Thanks for the test and feedback. I will look into this regression in the next days. Sounds like a bit hard than I original thought.
I just tested with such example, but it works correctly with my patch applied.
so, what is your test code? Thanks.
Yes. Your example works correctly.
I forgot about one condition. Put the doxygened macro definition first.
I did not attach importance to this. This is my mistake.
Oh, thanks for the example code, I found a mistake in my patch file, see the patched file, in function
You see that in the beginning of the function, I set a variable
But the variable should be set false before the return statement. I put the statement in the wrong place, so put them before the return statement. Patch against my original patch could be:
Thanks again for your test.
The modifed patch is in trunk now r10430, thanks for your contribution.