GNOME Bugzilla – Bug 774741
truncating parameterized macro function attribute
Last modified: 2016-11-22 20:32:01 UTC
Created attachment 340342 [details] Screenshot of generated doc showing truncation Given the following macro definition: #if defined(__GNUC__) && __GNUC__ >= 4 #define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y))) #else #define WL_PRINTF(x, y) #endif And given the following use, as a gcc function attribute: typedef void (*wl_log_func_t)(const char *, va_list) WL_PRINTF(1, 0); Doxygen seems to be truncating part of the function attribute, appearing like image01.png and image02.png (attached) Doxygen also truncates it similarly in other cases where I use the macro function attribute, so the problem seems consistent (it's not about this being a (typedef). It documents the macro itself just fine. My .doxygen config is: PROJECT_NAME = "Wayland" PROJECT_NUMBER = 1.12.90 OUTPUT_DIRECTORY = ../../doc/doxygen JAVADOC_AUTOBRIEF = YES TAB_SIZE = 8 QUIET = YES HTML_TIMESTAMP = YES GENERATE_LATEX = NO MAN_LINKS = YES PREDEFINED = WL_EXPORT= MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES DOT_MULTI_TARGETS = YES ALIASES += comment{1}="/* \1 *<!-- -->/" OPTIMIZE_OUTPUT_FOR_C = YES EXTRACT_ALL = YES EXTRACT_STATIC = YES GENERATE_HTML = NO GENERATE_XML = NO GENERATE_MAN = NO
Created attachment 340343 [details] Second screenshot of generated doc showing truncation
Also see: https://bugzilla.gnome.org/show_bug.cgi?id=773399
Hi Yong, Did you already try one of the following? 1) set EXPAND_ONLY_PREDEF = NO then doxygen will also process macro definitions like WL_PRINTF 2) set PREDEFINED = WL_PRINTF(x,y)= then doxygen will remove the WL_PRINTF macro definition
Thank you for the response. I can do what you suggest, but this only removes the entire function attribute from the documentation, rather than just fix the truncation. Is there a way to only solve the truncation issue?
No, the attribute is a non standard language extension, and is not supported by doxygen.