diff options
author | albert-github <albert.tests@gmail.com> | 2021-05-11 13:15:34 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-05-11 13:15:34 (GMT) |
commit | eff7c65d11435e2246e963fac8a3c87c38f00210 (patch) | |
tree | ab420ce156e45eb907d7d7462aaea2322b60918a /src | |
parent | cd998a7164e30cee896cccd190846b79ebb4355f (diff) | |
download | Doxygen-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.l | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; |