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 658033 - [PATCH] c++ scanner bug: group end marker eats up following sentences in the line
[PATCH] c++ scanner bug: group end marker eats up following sentences in the ...
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-09-02 07:01 UTC by matsu
Modified: 2012-11-18 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch fixing this bug. (853 bytes, patch)
2011-09-02 07:01 UTC, matsu
none Details | Review

Description matsu 2011-09-02 07:01:43 UTC
Created attachment 195455 [details] [review]
patch fixing this bug.

In scanner.l, group end marker is defined like following (simplified):

  "/* @}".*"*/"

Unfortunately, it matches multiple c-comment blocks.

When using macros, this trouble especially becomes a problem. 

For example, the following codes define a common member functions
of the class by the macro. 

 #define COMMON_MEMBER_FUNCTIONS(klass) \
   public: \
     /** @name constructors */ \
     /* @{ */ \
     klass(); \
     /* @} */ \
     /** @name common functions */ \
     /* @{ */ \
     void func(); \
     /* @} */

 class Class {
    COMMON_MEMBER_FUNCTIONS(Class)
 };

Macro is expanded in single-line by preprocessor, so, func() is lost,
and it is not described in generated documents.


Attached patch fixes this bug.

My best regards.
Comment 1 matsu 2011-09-02 08:15:47 UTC
The sample code previously enumerated seems to cause another bug too.
It is necessary to comment on the Qt style to make only the reported bug appear. 

 #define COMMON_MEMBER_FUNCTIONS(klass) \
   public: \
     /*! @name constructors */ \
     /* @{ */ \
     klass(); \
     /* @} */ \
     /*! @name common functions */ \
     /* @{ */ \
     void func(); \
     /* @} */

 class Class {
    COMMON_MEMBER_FUNCTIONS(Class)
 };
Comment 2 Dimitri van Heesch 2011-09-29 19:54:21 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 3 Dimitri van Heesch 2011-12-03 18:22:53 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.6. 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.