diff options
author | albert-github <albert.tests@gmail.com> | 2018-07-14 14:43:17 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-07-14 14:43:17 (GMT) |
commit | 657a6b5348d453fd1351b8c3238426e25acdbbb9 (patch) | |
tree | 2f294bf08ac7663186376fb93771df91f65a38c2 /src | |
parent | e8df803558f974dffc0b3d299d316c67a583251b (diff) | |
download | Doxygen-657a6b5348d453fd1351b8c3238426e25acdbbb9.zip Doxygen-657a6b5348d453fd1351b8c3238426e25acdbbb9.tar.gz Doxygen-657a6b5348d453fd1351b8c3238426e25acdbbb9.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/defargs.l | 15 |
1 files 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 <assert.h> #include <ctype.h> #include <qregexp.h> +#include <qstringlist.h> #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;j<qsl.count();j++) + { + if (!(qsl[j] == "unsigned" || qsl[j] == "signed" || + qsl[j] == "volatile" || qsl[j] == "const")) return FALSE; + } + return TRUE; +} %} B [ \t] @@ -384,8 +396,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" a->type.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; |