Commit 070c3554 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 731985 - Variadic macros failing to expand if trailing ... is empty

parent e24e777d
......@@ -886,8 +886,9 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
}
// PHASE 2: apply the macro function
if (argCount==def->nargs ||
(argCount>def->nargs && def->varArgs)) // matching parameters lists
if (argCount==def->nargs || // same number of arguments
(argCount>=def->nargs-1 && def->varArgs)) // variadic macro with at least as many
// params as the non-variadic part (see bug731985)
{
uint k=0;
// substitution of all formal arguments
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment