Menu

Doxygen comments taken from macro that is defining an enum

Gil Kalish
2019-01-09
2019-01-11
  • Gil Kalish

    Gil Kalish - 2019-01-09

    Hello Doxygen users,
    I’m using macros to define enums (and strings) in C:

    #define GENERATE_ENUM(ENUM, STR) ENUM,

    typedef enum action { FOREACH_ACTION(GENERATE_ENUM) } action_t;

    `#define FOREACH_ACTION(F) \

    F(ACTION_1 = 1, "Action 1") \
    
    F(ACTION_2 = 2 /**< Some Doxygen comment */, "Action 2”) \
    
    F(ACTION_3 = 3 /**< Some other Doxygen comment */, "Action 3") \
    
    F(ACTION_MIN = ACTION_1, "") \
    
    F(ACTION_MAX = ACTION_3, "")`
    

    I’m using doxygen 1.8.14 with MACRO_EXPANSION=YES in Doxifile (creating HTML output).
    For some reason ACTION_3 is not being parsed correctly, please see the attachment photo.

    Any idea how can I fix that so I will get ACTION_3 in the list with the matching comment?

     

    Last edit: Gil Kalish 2019-01-09
  • Gil Kalish

    Gil Kalish - 2019-01-11

    Same output for Doxygen 1.8.16.
    Attaching my Doxyfile.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.