Skip to content

Commit

Permalink
Add warning when encountering a nested comment start (/*) without mat…
Browse files Browse the repository at this point in the history
…ching end (*/).
  • Loading branch information
Dimitri van Heesch committed Jan 8, 2014
1 parent 1bdbbc6 commit 7f30d0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commentcnv.l
Expand Up @@ -977,6 +977,11 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
}
if (g_nestingCount>0 || YY_START==CComment)
{
warn(g_fileName,g_lineNr,"Reached end of file while still inside a (nested) comment. "
"Nesting level %d",g_nestingCount+1); // add one for "normal" expected end of comment
}
if (Debug::isFlagSet(Debug::CommentCnv))
{
g_outBuf->at(g_outBuf->curPos())='\0';
Expand Down

0 comments on commit 7f30d0a

Please sign in to comment.