summaryrefslogtreecommitdiffstats
path: root/src/defargs.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-07-14 14:43:17 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-07-14 14:43:17 (GMT)
commit657a6b5348d453fd1351b8c3238426e25acdbbb9 (patch)
tree2f294bf08ac7663186376fb93771df91f65a38c2 /src/defargs.l
parente8df803558f974dffc0b3d299d316c67a583251b (diff)
downloadDoxygen-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/defargs.l')
-rw-r--r--src/defargs.l15
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;