forked from qt-creator/qt-creator
		
	CppTools: Avoid matching function by name only
Compare full function signature, or at least argument count. Task-number: QTCREATORBUG-10295 Change-Id: Iead4d067209a8aea77cfcea2cd1ca5d08f87b165 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
		
				
					committed by
					
						
						Orgad Shaneh
					
				
			
			
				
	
			
			
			
						parent
						
							29091078ad
						
					
				
				
					commit
					151899b1b8
				
			@@ -73,8 +73,8 @@ public:
 | 
			
		||||
                    if (_oper->isEqualTo(name))
 | 
			
		||||
                        _result.append(fun);
 | 
			
		||||
            }
 | 
			
		||||
        } else if (const Identifier *id = _declaration->identifier()) {
 | 
			
		||||
            if (id->isEqualTo(fun->identifier()))
 | 
			
		||||
        } else if (Function *decl = _declaration->type()->asFunctionType()) {
 | 
			
		||||
            if (fun->isEqualTo(decl))
 | 
			
		||||
                _result.append(fun);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -338,7 +338,6 @@ QList<Declaration *> SymbolFinder::findMatchingDeclaration(const LookupContext &
 | 
			
		||||
    findMatchingDeclaration(context, functionType, &typeMatch, &argumentCountMatch, &nameMatch);
 | 
			
		||||
    result.append(typeMatch);
 | 
			
		||||
    result.append(argumentCountMatch);
 | 
			
		||||
    result.append(nameMatch);
 | 
			
		||||
    return result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user