Commit 9c0eacf8 authored by Francois Ferrand's avatar Francois Ferrand Committed by Erik Verbruggen

Fix argument count for functions with void argument.

This fixes highlighting calls to these functions.

Merge-request: 219
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@nokia.com>
parent 4943d199
......@@ -287,6 +287,8 @@ bool Function::hasReturnType() const
unsigned Function::argumentCount() const
{
const unsigned c = memberCount();
if (c > 0 && memberAt(0)->type()->isVoidType())
return 0;
if (c > 0 && memberAt(c - 1)->isBlock())
return c - 1;
return c;
......
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