Skip to content

getDefsNew fails to find symbols if a filename matches a namespace name #11282

@cantonios

Description

@cantonios

Describe the bug

For the Eigen project, we have a namespace Eigen, and a header file named Eigen. Doxygen fails to find certain symbols like Eigen::Aligned because of the conflicting scope names.

The reason seems to be because in the getDefsNew function here, the function first looks for a single scope. It finds the file version of Eigen (instead of the namespace scope), then tries to search that file scope for the symbol and fails.

To Reproduce

resolver.tar.gz

Expected behavior

If there are multiple matching scopes, doxygen should search all of them for the match.

Version

Compiled from master commit 163ed03282c894bd9a15cc2a81182cb5336daefd.

Possible Solutions

The most intrusive solution is to change the SymbolResolver to return all matching symbols. You would then iterate through all possible scopes.

The least intrusive seems to be to add an argument startIndex to SymbolResolver::resolveSymbol, that would only search the range starting at startIndex. In getDefsNew, you would then increment the startIndex when searching for the scope until either you find a match, or run out of scopes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions