From 7ef7b137d38d7ddcbcef787704317531b44c2baf Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 14 Jul 2018 19:28:02 +0200 Subject: Bug 436883 - Handling of unnamed parameters (C/C++) unclear Also the name should not be a reserved type of word. --- src/defargs.l | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/defargs.l b/src/defargs.l index f925ffb..47fa763 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -104,8 +104,10 @@ static int yyread(char *buf,int max_size) } /* bug_520975 */ -static bool checkSpecialType(QCString &typ) +static bool checkSpecialType(QCString &typ, QCString &nam) { + if (nam == "unsigned" || nam == "signed" || + nam == "volatile" || nam == "const") return TRUE; QStringList qsl=QStringList::split(' ',typ); for(uint j=0;jtype.mid(sv)=="union" || a->type.mid(sv)=="class" || a->type.mid(sv)=="typename" || - checkSpecialType(a->type) + checkSpecialType(a->type, a->name) ) { a->type = a->type + " " + a->name; -- cgit v0.12