vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Only Doxygen comments above function definition are parsed

Open michelleangela opened this issue 6 years ago • 6 comments

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

michelleangela avatar Jul 17 '20 17:07 michelleangela

@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 image

And repro with function declaration and definitions in separate files: image

image

image

image

michelleangela avatar Jul 17 '20 21:07 michelleangela

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.

magdumnikhil avatar Jul 20 '20 07:07 magdumnikhil

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 - image

Function comment not working - image

Overloaded function with one working and one not - image image

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

csgregg avatar Oct 21 '20 09:10 csgregg

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.

github-actions[bot] avatar Jan 17 '21 11:01 github-actions[bot]

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.

image

sean-mcmanus avatar Jan 21 '21 21:01 sean-mcmanus

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

github-actions[bot] avatar Mar 23 '21 11:03 github-actions[bot]