summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-02-25 18:40:23 (GMT)
committerGitHub <noreply@github.com>2020-02-25 18:40:23 (GMT)
commitb1335ab9b1ee1af36749d2fedd713d4b0803512e (patch)
tree8d3bd9b6997d63a2e7e28ee6b67293390f845850
parent3b392af822d81ae51919feb2c2fc4c539238bb3b (diff)
parente5451841b6e54171c0124e32a2773153ff3de922 (diff)
downloadDoxygen-b1335ab9b1ee1af36749d2fedd713d4b0803512e.zip
Doxygen-b1335ab9b1ee1af36749d2fedd713d4b0803512e.tar.gz
Doxygen-b1335ab9b1ee1af36749d2fedd713d4b0803512e.tar.bz2
Merge pull request #7617 from albert-github/feature/bug_typedef_const
Incorrect handling of typedef in combination with const
-rw-r--r--src/scanner.l13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 7990108..2342795 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1029,9 +1029,16 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->current->explicitExternal = TRUE;
lineCount(yyscanner);
}
-<FindMembers>{B}*"const"{BN}+ { yyextra->current->type += " const ";
- if (yyextra->insideCS) yyextra->current->stat = TRUE;
- lineCount(yyscanner);
+<FindMembers>{B}*"const"{BN}+ { if (yyextra->insideCS)
+ {
+ yyextra->current->type += " const ";
+ if (yyextra->insideCS) yyextra->current->stat = TRUE;
+ lineCount(yyscanner);
+ }
+ else
+ {
+ REJECT;
+ }
}
<FindMembers>{B}*"virtual"{BN}+ { yyextra->current->type += " virtual ";
yyextra->current->virt = Virtual;