bits4beethoven - 2023-08-16

I am wondering why doxygen truncates the source code. I want to document the following method, for example:

/**
 * @brief Count the number of bits set to 1 in a bitmask.
 * @param mask Bitmask to count bits in.
 * @return Returns the number of bits set to 1 in the bitmask.
 */
static u32 count_mask_bits(u64 mask)
{
  u32 count = 0;                                  /* Counter for bits set to 1                    */

  while (mask)
  {                                               /* While there are bits left in the mask        */
    if (mask & 1)
    {                                             /* If the least significant bit is 1            */
      count++;                                    /* Increment counter                            */
    }
    mask >>= 1;                                   /* Shift mask to the right                      */
  }

  return count;                                   /* Return number of bits set to 1               */
}

But passing it through doxygen results in the following code:

{
  u32 count = 0;                                  /* Counter for bits set to 1                    */

  while (mask)
  {                                               /* While there are bits left in the mask        */
    if (mask & 1)
    {                                             /* If the least significant bit is 1            */
      count++;                                    /* Increment counter                            */
    }

Many methods are affected by the same issue, and I do not understand the reason. I searched for special characters in the code, refactored it, rewrote it, but it does not help and the truncated documentation persists.

Do you know the reason?