Skip to content

Commit fdc8352

Browse files
committed
issue doxygen#11725 [BUG] Single‑line comments on members passed as arguments to a macro are treated as detailed description
1 parent 3df7ab1 commit fdc8352

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

src/pre.l

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,11 +920,39 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
920920
BEGIN(ArgCopyCComment);
921921
}
922922
<FindDefineArgs>{CPPC}[/!].*\n/{B}*{CPPC}[/!] { // replace multi line C++ style comment by C style comment
923-
yyextra->defArgsStr+=QCString("/**")+&yytext[3];
923+
if (Config_getBool(MULTILINE_CPP_IS_BRIEF) && !Config_getBool(QT_AUTOBRIEF))
924+
{
925+
if (yytext[3]=='<') // preserve < before @brief
926+
{
927+
yyextra->defArgsStr+=QCString("/**< @brief ")+&yytext[4];
928+
}
929+
else
930+
{
931+
yyextra->defArgsStr+=QCString("/** @brief ")+&yytext[3];
932+
}
933+
}
934+
else
935+
{
936+
yyextra->defArgsStr+=QCString("/**")+&yytext[3];
937+
}
924938
BEGIN(ArgCopyCppComment);
925939
}
926940
<FindDefineArgs>{CPPC}[/!].*\n { // replace C++ single line style comment by C style comment
927-
yyextra->defArgsStr+=QCString("/**")+&yytext[3]+" */";
941+
if (Config_getBool(QT_AUTOBRIEF))
942+
{
943+
yyextra->defArgsStr+=QCString("/**")+&yytext[3]+" */";
944+
}
945+
else // add brief command explicitly when translating C++ to C comment style
946+
{
947+
if (yytext[3]=='<') // preserve < before @brief
948+
{
949+
yyextra->defArgsStr+=QCString("/**< @brief ")+&yytext[4]+" */";
950+
}
951+
else
952+
{
953+
yyextra->defArgsStr+=QCString("/** @brief ")+&yytext[3]+" */";
954+
}
955+
}
928956
}
929957
<FindDefineArgs>{CPPC}.*\n { // replace C++ single line style comment by C style comment
930958
yyextra->defArgsStr+=QCString("/*")+&yytext[2]+" */";

0 commit comments

Comments
 (0)