From 657a6b5348d453fd1351b8c3238426e25acdbbb9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 14 Jul 2018 16:43:17 +0200 Subject: Bug 520975 - Unnamed parameters parsed incorrectly Added "signed" and "unsigned" to the list of "special types" analogous to "const" and "volatile" Created a function for this that would make it possible to have also constructs like "const const" recognized. --- src/defargs.l | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/defargs.l b/src/defargs.l index 7f1e1bb..f925ffb 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -52,6 +52,7 @@ #include #include #include +#include #include "defargs.h" #include "entry.h" @@ -102,6 +103,17 @@ static int yyread(char *buf,int max_size) return c; } +/* bug_520975 */ +static bool checkSpecialType(QCString &typ) +{ + QStringList qsl=QStringList::split(' ',typ); + for(uint j=0;jtype.mid(sv)=="union" || a->type.mid(sv)=="class" || a->type.mid(sv)=="typename" || - a->type=="const" || - a->type=="volatile" + checkSpecialType(a->type) ) { a->type = a->type + " " + a->name; -- cgit v0.12