summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-06-24 19:09:27 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-06-24 19:09:27 (GMT)
commit070c35549da108695074239be3ab4268f3722261 (patch)
tree95e5db7c9c2323ffb615a3134c5967cf382d8d59 /src/pre.l
parente24e777d56ec71fa74ff5949eb4aca388f6998a7 (diff)
downloadDoxygen-070c35549da108695074239be3ab4268f3722261.zip
Doxygen-070c35549da108695074239be3ab4268f3722261.tar.gz
Doxygen-070c35549da108695074239be3ab4268f3722261.tar.bz2
Bug 731985 - Variadic macros failing to expand if trailing ... is empty
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pre.l b/src/pre.l
index 6d818f3..f06cc98 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -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