File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -4583,13 +4583,29 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
4583
4583
lineCount(yyscanner);
4584
4584
yyextra->current->argList.setTrailingReturnType(" -> " );
4585
4585
yyextra->current->args += " -> " ;
4586
+ yyextra->roundCount=0;
4586
4587
BEGIN(TrailingReturn);
4587
4588
}
4588
4589
<TrailingReturn>[{;] {
4590
+ if (yyextra->roundCount!= 0) REJECT;
4589
4591
unput(*yytext);
4590
4592
BEGIN(FuncQual);
4591
4593
}
4592
4594
<TrailingReturn>. {
4595
+ if (*yytext == '(') yyextra->roundCount++;
4596
+ else if (*yytext == ')')
4597
+ {
4598
+ if (yyextra->roundCount)
4599
+ {
4600
+ yyextra->roundCount--;
4601
+ }
4602
+ else
4603
+ {
4604
+ warn(yyextra->yyFileName,yyextra->yyLineNr,
4605
+ " Found ' )' without opening ' (' for ' %s)...' " ,
4606
+ yyextra->current->argList.trailingReturnType().data());
4607
+ }
4608
+ }
4593
4609
yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
4594
4610
yyextra->current->args+=yytext;
4595
4611
}
You can’t perform that action at this time.
0 commit comments