Skip to content

Commit 8ae3fb1

Browse files
committed
Incorrect marking of enum values in source browser
When having a simple example like: ``` /// \file enum class Enum_cls { All_cls = 0, Functions_cls, New_cls }; enum Enum { All = 0, Functions, New }; ``` we see in the source listing (when `EXTRACT_ALL=YES`) that the lines 3, 6, 7, 9, 11, 14, 15 and 17 are (grey) marked instead of the lines 3, 6, 7, 8, 11, 13, 15 and 16. This has been corrected
1 parent 93b11f6 commit 8ae3fb1

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/scanner.l

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4060,8 +4060,16 @@ NONLopt [^\n]*
40604060
if (!yyextra->current->name.isEmpty())
40614061
{
40624062
yyextra->current->fileName = yyextra->fileName;
4063-
yyextra->current->startLine = yyextra->yyLineNr;
4064-
yyextra->current->startColumn = yyextra->yyColNr;
4063+
if (yyextra->current_root->section.isEnum() || yyextra->current_root->spec.isEnum())
4064+
{
4065+
yyextra->current->startLine = yyextra->current->bodyLine;
4066+
yyextra->current->startColumn = yyextra->current->bodyColumn;
4067+
}
4068+
else
4069+
{
4070+
yyextra->current->startLine = yyextra->yyLineNr;
4071+
yyextra->current->startColumn = yyextra->yyColNr;
4072+
}
40654073
if (!yyextra->current_root->spec.isEnum())
40664074
{
40674075
yyextra->current->type = "@"; // enum marker

0 commit comments

Comments
 (0)