After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 134719 - typedefs with same name from different namespaces not resolved correctly
typedefs with same name from different namespaces not resolved correctly
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2004-02-18 10:55 UTC by tim.vanholder
Modified: 2018-07-30 11:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2



Description tim.vanholder 2004-02-18 10:55:28 UTC
If two different namespaces have a typedef of the same name, doxygen
ignores all except one of them.

Given the following two namespaces:

namespace A {

  typedef float foo_t;

  static inline void
  bar_A(foo_t& fooval)
  {
  foo_t hi_dad;
    fooval += 2;
  }

}

namespace B {

  typedef int foo_t;

  static inline void
  bar_B(foo_t& fooval)
  {
  foo_t hi_mom;
    fooval *= 2;
  }

}

These have nothing in common, other than the foo_t name for a typedef.
However, if doxygen is run (using EXTRACT_ALL=YES, SOURCE_BROWSER=YES, and
INLINE_SOURCE=YES), a few anomalies are noticed:

- B's foo_t has no 'Referenced By' entries (A's foo_t does), and bar_B has
  no 'References' entries (bar_A does).
  Presumably related to this, the uses of foo_t in bar_B are not links in
  the source browser.
- The foo_t in bar_B's code gets linked to A's foo_t for the inline code
  listing.  Oddly enough, bar_B does NOT get listed in the 'Referenced By'
  section of the A::foo_t entry.

Note: in the source I originally noticed this behaviour in, the bar_B
function (well, its equivalent anyway) DID have a 'References' entry, but
it listed A::foo_t.

Other types with the same name in multiple namespaces are handled just
fine,  as evidenced by the results for the above after changing foo_t to a
struct (although in that case the inline code does not contain a link for
the occurrences of foo_t, which might be another bug).
Comment 1 Lee Winder 2007-09-09 18:50:50 UTC
This also occurs with classes with the same name in different namespaces (or nested namespaces), even if (as templates) they have different template parameters.

For example (qick pseudo code)

namespace container {

/*! 
* @addtogroup Containers
* @{
*/
/*!
* -- Documentation --
*/
template< typename T, class Alloc = alloc::simple_alloc >
class array
{
  //...
};

/** @} */ // end of Containers
}

namespace container {
namespace fixed {

/*! 
* @addtogroup Fixed_Containers
* @{
*/
/*!
* -- Documentation --
*/
template<typename T, size_t N>
class array
{
  //...
};

/** @} */ // end of Containers
}}

In the generated documentation, the same class (array< T, Alloc >) is displayed in both documentation groups, rather than the each different classes.  Interestingly no warnings or errors are generated when building the documentation.

I have gotten around this by calling the second class farray, but I really don't like altering the code based to make the documentation tool work! :)

This is occuring in v. 1.5.3
Comment 2 Christoph Schulz 2007-10-15 07:10:43 UTC
Both test cases work for me without problems (doxygen 1.5.3 for Windows).
Comment 3 André Klapper 2018-07-30 11:01:01 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!