summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-03-29 13:30:44 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-03-29 13:30:44 (GMT)
commit3770392fb215aade721544e3848289bf296a146c (patch)
tree9313e001f76aa76c7f4be23af989804b5b3c75b7
parent42bac34be2b7b4beb5ee468926ed0bf0e7528fd2 (diff)
downloadDoxygen-3770392fb215aade721544e3848289bf296a146c.zip
Doxygen-3770392fb215aade721544e3848289bf296a146c.tar.gz
Doxygen-3770392fb215aade721544e3848289bf296a146c.tar.bz2
issue #8465 Parens in return type template are dropped
The "(" was eaten when the sharp parens ended but not the number of round brackets so exter condition required.
-rw-r--r--src/scanner.l8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 38c8169..78afdab 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1914,7 +1914,8 @@ NONLopt [^\n]*
lineCount(yyscanner);
yyextra->current->name+='>';
// *yyextra->currentTemplateSpec+='>';
- if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
+ --yyextra->sharpCount;
+ if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
{
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
@@ -1925,6 +1926,11 @@ NONLopt [^\n]*
//printf("Found %s\n",yyextra->current->name.data());
BEGIN( ReadFuncArgType ) ;
}
+ else if (yyextra->sharpCount<=0)
+ {
+ yyextra->current->name+="(";
+ yyextra->roundCount++;
+ }
}
<EndTemplate>">"{BNopt}/"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { // function pointer returning a template instance
lineCount(yyscanner);