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 777753 - PREDEFINED macro expansion loses whitespaces
PREDEFINED macro expansion loses whitespaces
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.13
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2017-01-25 15:44 UTC by Frank Mehnert
Modified: 2018-07-30 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The .cpp containing the class declaration and implementation (310 bytes, text/x-c++src)
2017-01-25 15:45 UTC, Frank Mehnert
Details
The doxygen settings file (161 bytes, text/plain)
2017-01-25 15:45 UTC, Frank Mehnert
Details
The output of 'doxygen -d Preprocess foo.doxy' (3.31 KB, text/plain)
2017-01-25 15:46 UTC, Frank Mehnert
Details
The WARN_LOGFILE (102 bytes, text/plain)
2017-01-25 15:47 UTC, Frank Mehnert
Details

Description Frank Mehnert 2017-01-25 15:44:18 UTC
Doxygen always adds certain spaces when expanding PREDEFINED macros. This can lead to errors. Following example (I will attach the files):

/** Declares an empty constructor and destructor for the given class. */
#define DECLARE_EMPTY_CTOR_DTOR(cls) cls(); virtual ~cls();

/** This is a sample class. */
class fooclass
{
    DECLARE_EMPTY_CTOR_DTOR(fooclass)
};

fooclass::fooclass()
{
}

fooclass::~fooclass()
{
}


After 'doxygen -d Preprocess' I get

...
00008 /** This is a sample class. */
00009 class fooclass
00010 {
00011      fooclass  (); virtual ~  fooclass  ();
00012 };
...


The expected output would be


class fooclass
{
    fooclass(); virtual ~fooclass();
}


The wrongly expanded macro leads to the following warning:

foo.cpp:18: warning: documented symbol `fooclass::~fooclass' was not declared or defined.
Comment 1 Frank Mehnert 2017-01-25 15:45:00 UTC
Created attachment 344240 [details]
The .cpp containing the class declaration and implementation
Comment 2 Frank Mehnert 2017-01-25 15:45:33 UTC
Created attachment 344242 [details]
The doxygen settings file
Comment 3 Frank Mehnert 2017-01-25 15:46:22 UTC
Created attachment 344243 [details]
The output of 'doxygen -d Preprocess foo.doxy'
Comment 4 Frank Mehnert 2017-01-25 15:47:00 UTC
Created attachment 344244 [details]
The WARN_LOGFILE
Comment 5 Frank Mehnert 2017-01-25 15:48:00 UTC
With 1.8.12 and 1.8.13 I see the warning (see attachment 'errors').
Comment 6 Frank Mehnert 2017-03-17 11:02:35 UTC
Any additional information required?
Comment 7 André Klapper 2018-07-30 10:12:56 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!