Skip to content

Commit

Permalink
Bug 731985 - Variadic macros failing to expand if trailing ... is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Jun 24, 2014
1 parent e24e777 commit 070c355
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pre.l
Expand Up @@ -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
Expand Down

0 comments on commit 070c355

Please sign in to comment.