Skip to content

Autolinks to functions point to the struct with the same name #10349

@yous

Description

@yous

Creating a new issue from #9587 (comment).

Describe the bug
When there is a struct and a function with the same name, Doxygen autolinks to the struct, not to the function.

Expected behavior
foo(), foo(int, int), and foo(int a, int b) should be linked to the function. But I'm not sure what should I use to link to the struct.

Screenshots
Screenshot 2023-10-09 02 48 12

To Reproduce

/**
 * @file    header.h
 * @brief   description header file
 */

#ifndef HEADER_H
#define HEADER_H

/**
 * @struct foo
 * @brief struct named foo
 *
 * @sa foo()
 */
struct foo {
    int x;
    int y;
};

/**
 * @brief function named foo
 *
 * @sa @link foo @endlink
 */
int foo(int a, int b);

#endif /* HEADER_H */

Run doxygen ..

Version
Both on Intel macOS:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions