It seems Doxygen (1.13.2) still has some issues handling C typedefed structs even if I use the TYPEDEF_HIDES_STRUCT = YES
option. (setting OPTIMIZE_OUTPUT_FOR_C
has no effect on this either)
// in file A.h
typedef struct _A {
} A;
// in file B.h
#include "A.h"
typedef struct _B {
A super;
} B;
in the generated documentation
// in file A.h
// adding struct _A; here will not make any difference
typedef struct _A A;
struct _A {
int (*func)(A *s);
};
// in file B.h
#include "A.h"
typedef struct _B {
A super;
} B;
in which case
As you can see in example 2, I sometimes have to use forward declarations; there is no other option.
The example config differences compared to the default are
# Difference with default Doxyfile 1.13.2
PROJECT_NAME = "example doc"
OUTPUT_DIRECTORY = build/doc
CREATE_SUBDIRS = YES
TYPEDEF_HIDES_STRUCT = YES
NUM_PROC_THREADS = 6
EXTRACT_ALL = YES
INPUT = ./
FILE_PATTERNS = *.c \
*.h
RECURSIVE = YES
EXCLUDE = build
EXCLUDE_PATTERNS = */build/*
USE_MDFILE_AS_MAINPAGE = README.md
GENERATE_LATEX = NO
HAVE_DOT = YES
Real life reproduction of the problem
git clone -b develop .git syslog-ng
mkdir build
doxygen
and
source\Classes\Class List\AFSocketSourceDriver
(in the example A(_A)syslog-ng source\Classes\Class List\AFInetSourceDriver
(in the example B(_B)My questions are: