Skip to content

Commit 4b24900

Browse files
committed
Incorrect setting return state after \include{doc}
When having: ``` /// \file /// /// The level 1 /// /// \include kaboom.md kaboom.md /// /// \include{doc} kaboom.md kaboom.md /// the fie 1 void foo_1(); /// the class 1 class cls_1{}; ``` we get the warning ``` .../foo.h:20: warning: Member foo_1() (function) of file foo.h is not documented. ``` and we see in the resulting documentation that the content from `kaboom.md` is twice present present for `\include{doc}` but only once for `\include` togehtehr wit the extra text `kaboom.h`. This problem is due to the fact that the old jump back state was set to `YY_START` which is the state `IncludeDoc` (from rule `<IncludeDoc>{FILEMASK}|"\""[^\n\"]+"\"" {`) but should have been the state `IncludeFile` from the rule `<CComment,ReadLine,IncludeFile>[\\@]("include"{B}*"{doc}"|"includedoc") {` (and properly stared in yyextra->includeCtx).
1 parent ebe22c6 commit 4b24900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commentcnv.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ static bool readIncludeFile(yyscan_t yyscanner,const QCString &inc,const QCStrin
14071407
fs->bufState = YY_CURRENT_BUFFER;
14081408
fs->oldLineNr = yyextra->lineNr;
14091409
fs->oldFileName = yyextra->fileName;
1410-
fs->oldState = YY_START;
1410+
fs->oldState = yyextra->includeCtx;
14111411
fs->oldFileBuf = yyextra->inBuf;
14121412
fs->oldFileBufPos = yyextra->inBufPos;
14131413
fs->oldIncludeCtx = yyextra->includeCtx;

0 commit comments

Comments
 (0)