Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[c++] virtual and related functions not supported #41

Closed
bartlibert opened this issue Sep 5, 2019 · 6 comments
Closed

[c++] virtual and related functions not supported #41

bartlibert opened this issue Sep 5, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@bartlibert
Copy link

Describe the bug
In c++, function can be marked virtual. DoGe does not support them. When the "virtual" keyword is removed, everything works.
Also, a virtual function can be marked as "pure virtual" by appending "=0" after it. This is not supported either.
Finally, when a child class overrides a virtual function from its parent, it can/must be marked "override" or "final", this is not supported either.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file test.h with the following content:
class Test {
    virtual void my_virtual_function();
    virtual void my_pure_virtual_function() = 0;
};

class Test2: public Test {
    void my_virtual_function() override;
    void my_pure_virtual_function() final;
}
  1. Try to generate documentation for any of the my_virtual_function of my_pure_virtual_function lines.

Expected behavior
Documentation is created.

@bartlibert bartlibert added the bug Something isn't working label Sep 5, 2019
@kkoomen
Copy link
Owner

kkoomen commented Nov 2, 2019

We're working on a good and stable implementation for the C-family, but we're a bit stuck at #55 using a python binding of clang. If you have any experience or want to help out, please do. At this moment we're stuck. If we fix this we can probably get a good C version running.

EDIT: the issue has been resolved and we're able to use clang to generate accurate results. More discussion will be on #55.

@kkoomen
Copy link
Owner

kkoomen commented Nov 10, 2019

Development progress for C++ can be tracked via PR #56.

@kkoomen
Copy link
Owner

kkoomen commented Nov 14, 2019

@bartlibert Can you provide me with clear documentation results that you'd expect in your code? If you have done that I can fix this immediately.

@bartlibert
Copy link
Author

As far as I know, there is no dedicated doxygen support for virtual functions, so the documentation should be exactly the same as "normal" functions.

@kkoomen
Copy link
Owner

kkoomen commented Oct 5, 2020

@bartlibert We're doing a rewrite without clang with a new modern parser called tree-sitter where this issue will be fixed. See #101

@kkoomen kkoomen mentioned this issue Oct 5, 2020
3 tasks
kkoomen added a commit that referenced this issue Oct 24, 2020
feat(cpp): add support for virtual functions (#41)
@kkoomen
Copy link
Owner

kkoomen commented Oct 24, 2020

This bug has been fixed and released in v3.4.0.

Feel free to submit any new issues if you experience any unwanted behavior in the future. Thanks for your contribution.

@kkoomen kkoomen closed this as completed Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants