OSDN Git Service
(root)
/
qt-creator-jp
/
qt-creator-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4943d19
)
Fix argument count for functions with void argument.
author
Francois Ferrand
<thetypz@gmail.com>
Tue, 16 Nov 2010 11:58:30 +0000
(12:58 +0100)
committer
Erik Verbruggen
<erik.verbruggen@nokia.com>
Thu, 18 Nov 2010 12:51:18 +0000
(13:51 +0100)
This fixes highlighting calls to these functions.
Merge-request: 219
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
src/shared/cplusplus/Symbols.cpp
patch
|
blob
|
history
diff --git
a/src/shared/cplusplus/Symbols.cpp
b/src/shared/cplusplus/Symbols.cpp
index
dd39b06
..
0bb231e
100644
(file)
--- a/
src/shared/cplusplus/Symbols.cpp
+++ b/
src/shared/cplusplus/Symbols.cpp
@@
-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;