summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-01-20 17:52:20 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-01-20 17:52:20 (GMT)
commit7a26be70f5c2a4e1454807e13267bacef380883d (patch)
tree063688bec51d629adf71ed5c231330c3523537df
parentbb379a38de9fd6afac1fa32e93f2ca2e90433a9d (diff)
downloadDoxygen-7a26be70f5c2a4e1454807e13267bacef380883d.zip
Doxygen-7a26be70f5c2a4e1454807e13267bacef380883d.tar.gz
Doxygen-7a26be70f5c2a4e1454807e13267bacef380883d.tar.bz2
Incorrect line count for normal comment in define
When having the program: ``` /// \file #define A_DEF 2 /* A line * A line */ /** * the wrong line \line7 */ void fie(void) {} `` we get the message: ``` aa.c:6: warning: Found unknown command '\line7' ``` instead of ``` aa.c:7: warning: Found unknown command '\line7' ``` Also in the source code and the reference to it we see a wrong line number for the function `fie`.
-rw-r--r--src/pre.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pre.l b/src/pre.l
index 4a86562..cdb9533 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1351,6 +1351,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
yyextra->yyLineNr++;
yyextra->defLitText+=yytext;
yyextra->defText+=' ';
+ outputChar(yyscanner,'\n');
}
<RemoveCComment>"*/"{B}*"#" { // see bug 594021 for a usecase for this rule
if (yyextra->lastCContext==SkipCPPBlock)