clang-format, Doxygen comments

Hi, I would like to reformat an existing code base using clang-format (according to the Google guidelines). As shown below, the line breaking of some Doxygen comments is not yet optimal using version 3.5. Any hints on how to avoid this? Is there special support for Doxygen comments in clang-format? Thank you very much in advance for your help! Regards

Before:

void fun(
RAI last,
/**< [IN] Random access iterator […] of the
input range */

After:

void fun(
RAI last,
/**< [IN] Random access iterator […] of
the
input range */

Ideally:

void fun(
RAI last,
/**< [IN] Random access iterator […] of
the input range */

There are two fundamental things to do here:

  • Properly format doxygen comments (ideally understanding things like the “<”.
  • Re-flowing of comments (doxygen or not)

Both have been on our list for quite some time, but we never really got around to it.

Alex, how hard would it be to add basic re-flowing?

There are two fundamental things to do here:
- Properly format doxygen comments (ideally understanding things like the
"<".
- Re-flowing of comments (doxygen or not)

Both have been on our list for quite some time, but we never really got
around to it.

Alex, how hard would it be to add basic re-flowing?

Token breaking and alignment code is pretty fragile, so it's hard to say
how long will it take. My rough guess is that it should be doable in a week
or so. I can look at it some time this week to get a better idea.