Skip to content

Commit 877f10d

Browse files
committed
issue doxygen#11849 Incorrect evaluation of __VA_OPT__ when preprocessing
1 parent 5d2ecb7 commit 877f10d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pre.l

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,13 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
18711871
<RemoveCPPComment>{CPPC}
18721872
<RemoveCPPComment>[^\x06\n]+
18731873
<RemoveCPPComment>.
1874+
<DefineText>"__VA_OPT__("{B}*"##" {
1875+
warn(yyextra->fileName,yyextra->yyLineNr,
1876+
"'##' may not appear at the beginning of a __VA_OPT__()",
1877+
yyextra->defName,yyextra->defLitText.stripWhiteSpace());
1878+
yyextra->defText+="__VA_OPT__(";
1879+
yyextra->defLitText+="__VA_OPT__(";
1880+
}
18741881
<DefineText>"#"/"__VA_OPT__" {
18751882
yyextra->defText+=yytext;
18761883
yyextra->defLitText+=yytext;

0 commit comments

Comments
 (0)