Skip to content

Commit ab74a74

Browse files
committed
Mismatch #if / #endif when "verbatim" command in non doxygen comment
When having something like: ``` #if !defined(__linux__) /* @code */ #endif ``` we get a warning like: ``` warning: More #if's than #endif's found (might be in an included file). ``` as an attempt is made too match `@code` with `@endcode` even in a non doxygen comment
1 parent 0578c6d commit ab74a74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pre.l

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,8 +1583,11 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
15831583
<SkipCComment>{LITERAL_BLOCK} { // normal block command
15841584
outputArray(yyscanner,yytext,yyleng);
15851585
yyextra->yyLineNr+=QCString(yytext).contains('\n');
1586-
determineBlockName(yyscanner);
1587-
BEGIN(SkipVerbatim);
1586+
if (yyextra->isSpecialComment)
1587+
{
1588+
determineBlockName(yyscanner);
1589+
BEGIN(SkipVerbatim);
1590+
}
15881591
}
15891592
<SkipCond>{CMD}{CMD}"cond"[ \t]+ {}// escaped cond command
15901593
<SkipCond>{CMD}"cond"/\n |

0 commit comments

Comments
 (0)