Only Doxygen comments above function definition are parsed
Only doxygen comments above function definition are parsed and shown over tooltip. Comments above function declaration are ignored.
Is there any setting which decides this?
Originally posted by @magdumnikhil in https://github.com/microsoft/vscode-cpptools/issues/658#issuecomment-660070996
@magdumnikhil , there is no setting to choose which comment (declaration or definition) gets displayed in the tooltip.
However, I was not able to reproduce the behavior of only comments from definitions are displayed in the tooltip. Could you provide a sample repro for this?
The repro I tried was the following, where hover over function call displays comments from declaration

And repro with function declaration and definitions in separate files:




In my current workspace, this is getting reproduced, but I can't share the it directly. Also, I'm seeing some error squiggles for #includes, possibly that can be the reason for this.
I will try to get rid of those, and comment again.
I am experiencing this too, but not consistently. It happens on some functions but not others and I cannot see what the determining factor is. Even with overloaded functions, it doesn't do it consistently between them. I just can't pin it down.
It's a real pain as I want to put the doxygen comments with the declarations following best practice - comment 'what it does' in the header and 'how it works' in the source.
Here's some examples -
Class comment not working -

Function comment not working -

Overloaded function with one working and one not -

None of these have comments with the definitions. If I move them to the definitions, then they all work.
Here's the file in the repo - https://github.com/csgregg/csg-esp8266-rota/blob/Debuging-doxygen-comments/lib/Logger/src/Logger.h
Hey @michelleangela, this issue might need further attention.
@michelleangela, you can help us out by closing this issue if the problem no longer exists, or adding more information.
Can you still repro this with https://github.com/microsoft/vscode-cpptools/releases/tag/1.2.0-insiders2? I'm not reproing it, but I might not be configured the same.

This issue has been closed automatically because it needs more information and has not had recent activity.