Skip to content

Duplicate (double) documentation generated for friend function #10828

Closed

Description

@scott-zhong

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*)

Activity

  1. albert-github commented on Apr 26, 2024

    @albert-github
    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(-)
    
  2. scott-zhong commented on Apr 27, 2024

    @scott-zhong
    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

  3. added a commit that references this issue on Apr 29, 2024
  4. doxygen commented on Apr 29, 2024

    @doxygen
    Owner

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

  5. scott-zhong commented on Apr 30, 2024

    @scott-zhong
    Author

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

  6. doxygen commented on May 20, 2024

    @doxygen
    Owner

    This issue was previously marked 'fixed but not released',
    which means it should be fixed in doxygen version 1.11.0.
    Please verify if this is indeed the case. Reopen the
    issue if you think it is not fixed and please include any additional information
    that you think can be relevant (preferably in the form of a self-contained example).

  7. removed
    fixed but not releasedBug is fixed in github, but still needs to make its way to an official release
    on May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions