Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #8393 @Endcond not behaving as expected (missing warnings, missing output) #10156

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/pre.l
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ static const char *stateToString(int state);

struct preYY_CondCtx
{
preYY_CondCtx(int line,const QCString &id,bool b)
: lineNr(line), sectionId(id), skip(b) {}
preYY_CondCtx(QCString file,int line,const QCString &id,bool b)
: fileName(file), lineNr(line), sectionId(id), skip(b) {}
QCString fileName;
int lineNr;
QCString sectionId;
bool skip;
Expand Down Expand Up @@ -3441,7 +3442,7 @@ static void startCondSection(yyscan_t yyscanner,const QCString &sectId)
//printf("startCondSection: skip=%d stack=%d\n",state->skip,state->condStack.size());
CondParser prs;
bool expResult = prs.parse(state->fileName.data(),state->yyLineNr,sectId.data());
state->condStack.emplace(std::make_unique<preYY_CondCtx>(state->yyLineNr,sectId,state->skip));
state->condStack.emplace(std::make_unique<preYY_CondCtx>(state->fileName,state->yyLineNr,sectId,state->skip));
if (!expResult)
{
state->skip=TRUE;
Expand Down Expand Up @@ -3809,7 +3810,7 @@ void Preprocessor::processFile(const QCString &fileName,BufStr &input,BufStr &ou
const std::unique_ptr<preYY_CondCtx> &ctx = state->condStack.top();
QCString sectionInfo = " ";
if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",qPrint(ctx->sectionId.stripWhiteSpace()));
warn(fileName,ctx->lineNr,"Conditional section%sdoes not have "
warn(ctx->fileName,ctx->lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",qPrint(sectionInfo));
state->condStack.pop();
}
Expand Down