Doxygen comments not generated

Completed

I have trouble with CLion not generating any doxygen comments in C++ when I enter /// (or one of the other possibilities). If I enable the brief tag it will only generate the \brief tag in inline format even though it is not inline

This is my first VisualStudio project in CLion and I had much trouble to setup this toolchain first, before I updated to 2020.3.3 which fixed the compiler detection. Next was the problem that my new generated classes were not linked to any target, which I did by adding all cpp and h files to the single target.

But still when I enter /// I only get the \brief tag. 

I first tried on the bare empty typing /// in the line before the class as I wanted to document the class purpose. As this did not work I did populate protection parts (public & protected) and added a field as well as the default constructor. 

 

The program still compiles, and I get only the warning about the field not being used (exclamation sign). Wherever I type (line before class, before constructor or before field) /// I only get "/// \brief "

Code sensing also works fine as adding this-> to the constructor body shows the added field.

What am I missing ?

0
2 comments

Ok, seems that probably only my expectations were wrong. When typing /// or /** in CLion in from of a class I did expect it to generate the @class tag, which I know is not mandatory. In the heat of trying to find out what's "wrong" I did then create default constructors without arguments, resulting again in only @brief to be generated and I did not realize this is ok as long as there is no return and parameter..

This morning after a night of sleep, I realized that oxygen comments are well generated for @params an @return

However, one thing that did missled me also in this quest was the fact that I am used to always use line comments (//) in C++ . However if I used /// in CLion it will not recognize that the previous line already has /// and again generated /// \brief on each new line.

IMHO, CLion should recognize if /// was used in the beginning of the line (or only spaced before it) and automatically add another /// for the next line when enter is pressed. (at least as Enter smart-key option)

 

0

Please sign in to leave a comment.