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

Duplicate (double) documentation generated for friend function #10828

Open
scott-zhong opened this issue Apr 25, 2024 · 4 comments
Open

Duplicate (double) documentation generated for friend function #10828

scott-zhong opened this issue Apr 25, 2024 · 4 comments
Labels
bug C/C++ fixed but not released Bug is fixed in github, but still needs to make its way to an official release

Comments

@scott-zhong
Copy link

Describe the bug
Duplicate (double) documentation generated for friend function. See the following testcase

/**
 * A docs
 */
class A
{
public:
    friend A operator*(const A& x, const A& y);
};

/**
 * \relates A
 * 
 * A operator* docs
 */
A operator*(const A& x, const A& y);

/**
 * B docs
 */
template <typename T>
class B
{
public:
    /**
     * B operator* docs
     */
    T operator*(void) const
    {
        return T();
    }
};

A operator*() is documented twice in Doxygen 1.8.18 - Doxygen trunk (eb11063*)

Screenshots
Doxygen 1.8.17:
image

Doxygen 1.8.18 - trunk (eb11063*)
image

To Reproduce
testcase.zip

Expected behavior
Single instance of A operator*() documentation

Version
1.8.18 - trunk (eb11063*)

@albert-github
Copy link
Collaborator

It looks like the difference is the result of:

369e821fc6870e9e6b30aa13d59592c12c760800 is the first bad commit
Date:   Wed Apr 8 22:10:56 2020 +0200

    Replaced MemberNameSDict by MemberNameLinkedMap based on LinkedMap

 src/clangparser.cpp  |    8 +-
 src/classdef.cpp     |   62 +-
 src/code.l           |   40 +-
 src/context.cpp      |   36 +-
 src/doxygen.cpp      | 1980 ++++++++++++++++++++++++--------------------------
 src/doxygen.h        |    6 +-
 src/fortrancode.l    |  193 ++---
 src/membername.cpp   |   43 +-
 src/membername.h     |   42 +-
 src/namespacedef.cpp |  138 ++--
 src/pre.l            |   15 +-
 src/searchindex.cpp  |   20 +-
 src/util.cpp         |   80 +-
 13 files changed, 1231 insertions(+), 1432 deletions(-)

@scott-zhong
Copy link
Author

I think this is the same bug with template and friend function.

/**
 * A docs
 */
template< class T >
class A
{
public:

    friend A<double> fun(const A<double>& v);
};

/**
 * \relates A
 * fun docs
 */
A<double> fun(const A<double>& V);

/**
 * B docs
 */
template< class T >
class B
{
public:

    friend B<double> fun(const B<double>& v);
};

1.8.17
image

1.8.18 - trunk (eb11063)
image

@doxygen
Copy link
Owner

doxygen commented Apr 29, 2024

@scott-zhong Please verify if the referenced commit fixes the problem for you. Do not close the issue, this will be done automatically when the next official release becomes available.

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Apr 30, 2024
@scott-zhong
Copy link
Author

@doxygen This does fix it. Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug C/C++ fixed but not released Bug is fixed in github, but still needs to make its way to an official release
Projects
None yet
Development

No branches or pull requests

3 participants