summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-05-11 13:15:34 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-05-11 13:15:34 (GMT)
commiteff7c65d11435e2246e963fac8a3c87c38f00210 (patch)
treeab420ce156e45eb907d7d7462aaea2322b60918a /src
parentcd998a7164e30cee896cccd190846b79ebb4355f (diff)
downloadDoxygen-eff7c65d11435e2246e963fac8a3c87c38f00210.zip
Doxygen-eff7c65d11435e2246e963fac8a3c87c38f00210.tar.gz
Doxygen-eff7c65d11435e2246e963fac8a3c87c38f00210.tar.bz2
issue #8542 Variadic macro expansion
The variadic macro was not handled in case there were fixed arguments as well.
Diffstat (limited to 'src')
-rw-r--r--src/pre.l13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pre.l b/src/pre.l
index 7b48ca7..54627ce 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -3241,10 +3241,17 @@ static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
) // predefined function macro definition
{
static const reg::Ex reId(R"(\a\w*)");
+ static const reg::Ex reVaArgs(R"(, *\.\.\. *$)");
reg::Iterator end;
bool varArgs = false;
int count = 0;
std::map<std::string,int> argMap;
+ reg::Iterator it1(ds.substr(i_obrace+1,i_cbrace-i_obrace-1),reVaArgs,0);
+ if (it1 != end)
+ {
+ i_cbrace -= it1->length();
+
+ }
if (ds.substr(i_obrace+1,i_cbrace-i_obrace-1)=="...")
{
varArgs = true;
@@ -3274,6 +3281,12 @@ static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
}
++it;
}
+ if (it1!=end)
+ {
+ varArgs = true;
+ argMap.emplace("__VA_ARGS__",count);
+ count++;
+ }
}
// strip definition part
std::string definition;