GNOME Bugzilla – Bug 740218
Full scope needed when making link inside cross-referenced section [with test case]
Last modified: 2014-12-25 16:03:41 UTC
Created attachment 290809 [details] Repro/test case See attached ZIP file for minimal repro case or the following snippet: namespace Foo { /** @brief Structure */ struct Bar { /** * @brief Foo * @deprecated Use @ref bar() instead. */ void foo1(); /** * @brief Foo * @deprecated Use @ref Foo::Bar::bar() "bar()" instead. */ void foo2(); /** @brief Bar */ void bar(); }; } WHen generating docs, Doxygen compains about invalid reference on the deprecated page: deprecated:2: warning: unable to resolve reference to `bar()' for \ref command The first link is created correctly in the class documentation, but not on the Deprecated page (deprecated.html). When full scope is specified like in the second case, the link is correctly generated, but the workaround gets annoying when the scope is too long to write. This happens for all cross-referenced items, such as @todo, @bug and user-defined ones created with @xrefitem. Would it possible for Doxygen to remember scope of each cross-referenced item when creating given page and resolve links relative to that scope? Tested with current Git (9f477b8), but the issue appears for some time (I think it was present already in 1.7).
Created attachment 290811 [details] HTML Page of Deprecated List
I have the same problem with version 1.8.8. In addition, a search for similar bugs reveals that Doxygen has a problem with referencing functions in structs and classes within the namespace it is documenting. I also put some code underneath bar(), named the function foo3(), and bar() is still not being referenced in deprecated blocks.
Created attachment 290814 [details] Edited Test Case
Confirmed. Should be fixed in the next GIT update.
Sorry for taking so long to reply, but the commit (c6e41226574) caused an regression for me. The relative scope now works properly, but the output is broken in the following case (also included in the following attachment): namespace MyNamespace { template<class> struct Foo; /** @todo Xrefitem works without issues */ template<class T> struct Foo<T> {}; /** @todo Xrefitem prints warning */ template<class T> struct Foo<Bar<T>> {}; } When processing the file, Doxygen prints the following output (in other words, fully-scoped name of the documented template specialization, character by character): todo:2: warning: Unexpected character `M' todo:2: warning: Unexpected character `y' todo:2: warning: Unexpected character `N' todo:2: warning: Unexpected character `a' todo:2: warning: Unexpected character `m' todo:2: warning: Unexpected character `e' todo:2: warning: Unexpected character `s' todo:2: warning: Unexpected character `p' todo:2: warning: Unexpected character `a' todo:2: warning: Unexpected character `c' todo:2: warning: Unexpected character `e' todo:2: warning: Unexpected character `:' todo:2: warning: Unexpected character `:' todo:2: warning: Unexpected character `F' todo:2: warning: Unexpected character `o' todo:2: warning: Unexpected character `o' In addition to this warning, in the cross-reference list (in this case the TODO list), the following is displayed: Bar< T > > Class MyNamespace::Foo< Bar< T > > instead of just: Class MyNamespace::Foo< Bar< T > > To be clear, the issue appears only when using template as template parameter in template specialization (very corner case, I know). When using non-templated type as template parameter (the first case), it works properly. Also it doesn't matter if the class is enclosed in namespace or not. The issue is not present in the parent commit (9f477b87fc49) and is still present in current master (b3c44e52cf7226b1). Thanks a lot!
Created attachment 292995 [details] Repro/test case for the regression
I tested attachment in comment #6 with the release version of 1.8.8 to verify the output. The output is okay, and I turned off quiet to verify there were no warnings. Unfortunately, I have not yet found a way to compile 1.8.8-GIT on my Windows laptop, despite a request on bug 697511 to get the necessary files to get Visual Studio to compile doxygen.
Regression confirmed. Should be fixed in the next GIT update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.9. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferrably in the form of a self-contained example).