Skip to content

Commit

Permalink
Fix not initialized pointer when parser is starting on a new file.
Browse files Browse the repository at this point in the history
The pointer oldEntry holds the last value of VhdlParser::current and is
compared to detect comment blocks that belong together. This could lead to
false positives when a new file is parsed and the new entry in
VhdlParser::current has by change the same pointer value as the old entry.
Doxygen warning like "warning: Found unknown command `\brief'" are the
consequence that leads to concatenated brief and detailed description in
the resulting output.
  • Loading branch information
Andreas Regel committed Dec 4, 2017
1 parent 4f45bd2 commit 52fb4cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vhdljjparser.cpp
Expand Up @@ -196,6 +196,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
VhdlParser::lastEntity=0;
VhdlParser::currentCompound=0;
VhdlParser::lastEntity=0;
oldEntry = 0;
VhdlParser::current=new Entry();
VhdlParser::initEntry(VhdlParser::current);
groupEnterFile(fileName,yyLineNr);
Expand Down

0 comments on commit 52fb4cd

Please sign in to comment.