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 678139 - (FriendlyWarning) Spurious warning with friend in different namespace: documented function `Singleton< A >' was not declared or defined
(FriendlyWarning)
Spurious warning with friend in different namespace: documented function `Sin...
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.1.1
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-06-15 05:29 UTC by john.x.foster
Modified: 2012-12-26 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
7z zip of visual studio 2008 project, with output (75.39 KB, application/octet-stream)
2012-06-15 05:29 UTC, john.x.foster
Details

Description john.x.foster 2012-06-15 05:29:38 UTC
Created attachment 216493 [details]
7z zip of visual studio 2008 project, with output

Friend template declaration in a different namespace causes the warning: "documented function `Singleton< A >' was not declared or defined."

The attached project has classes A and B - A generates the warning, B does not. The only difference is the namespace.

The output documentatioh is also incorrect. The class A appears twice in the class list, once in the correct namespace, and once in the globalnamespace.
Comment 1 Matthew Woehlke 2012-09-12 22:00:05 UTC
I can confirm at least the second half of this. Given a file like:

namespace foo
{
  class cow;

  /// Pig is documented.
  class pig
  {
    friend class cow;
  };
}

...cow will show up in both the global namespace and 'foo' namespace. Reproducible on 1.8.2.

I'd suspect that the misidentification of the namespace scope, as evidenced by the second problem, is also the underlying cause of the first.
Comment 2 Dimitri van Heesch 2012-09-16 10:26:55 UTC
Hi John,

In your example class B derived from a Singleton in non-existent class ns0. This causes the extra Singleton in the output. I'll hide this in such case.

Matthew,

With your snippet I did not manage to reproduce the problem. Can you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem?
Comment 3 Matthew Woehlke 2012-09-17 17:42:58 UTC
Ah... my issue seems to only happen with template classes.

Revised snippet:

namespace animals
{
  template <typename T> class milk_provider;

  /// Moo!
  class cow
  {
    template <typename T> friend class milk_provider;
  };
}

I can reproduce with the above, and the Doxyfile from https://bugzilla.gnome.org/attachment.cgi?id=224536. Given that, this seems like it may not be related. Would you like me to open a separate bug report?
Comment 4 Dimitri van Heesch 2012-12-26 16:09:31 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3. 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.
Comment 5 Matthew Woehlke 2012-12-26 16:36:50 UTC
What about the problem I'm seeing? Is it fixed? Should I file a different bug?
Comment 6 Dimitri van Heesch 2012-12-26 16:41:53 UTC
If you still see it in 1.8.3, then please file a new bug for it. 
Having two different problems in one bug report doesn't work very well.