diff options
author | albert-github <albert.tests@gmail.com> | 2020-02-25 13:56:05 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-02-25 13:56:05 (GMT) |
commit | e5451841b6e54171c0124e32a2773153ff3de922 (patch) | |
tree | 8d3bd9b6997d63a2e7e28ee6b67293390f845850 | |
parent | 3b392af822d81ae51919feb2c2fc4c539238bb3b (diff) | |
download | Doxygen-e5451841b6e54171c0124e32a2773153ff3de922.zip Doxygen-e5451841b6e54171c0124e32a2773153ff3de922.tar.gz Doxygen-e5451841b6e54171c0124e32a2773153ff3de922.tar.bz2 |
Incorrect handling of typedef in combination with const
I issue #7060 and example was given with
```
typedef const char m_msgEvtName;
```
we see that
- 1.8.15, listed under Typedefs:
` typedef const char m_msgEvtName`
- 1.8.16 and up, listed under Variables:
`const typedef char m_msgEvtName`
so mentioned:
- wrong "header"
- const at the wrong place
This is a regression on:
C# consts incorrectly placed under instance variables (Origin: bugzilla #535853) (issue #2976)
and the pull request #7048
The fix should only be used for C#
-rw-r--r-- | src/scanner.l | 13 |
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; |