forked from qt-creator/qt-creator
		
	Fix argument count for functions with void argument.
This fixes highlighting calls to these functions. Merge-request: 219 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
		
				
					committed by
					
						
						Erik Verbruggen
					
				
			
			
				
	
			
			
			
						parent
						
							4943d19907
						
					
				
				
					commit
					9c0eacf800
				
			@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user