forked from qt-creator/qt-creator
		
	CppTools: Do not highlight instantiation as call
Underlying C++ model sometimes marks C++ object instantiation using initializer as a (forward) function declaration. This leads to incorrect highlighting of object variables as if they were function calls. C++ model however marks in this case (and not any other case) such symbols as ambiguous function types, see CPlusPlus::Bind::visit. This change skips such ambiguous functions for highlighting as function call. Also add test case for related bug report. Task-number: QTCREATORBUG-15212 Change-Id: Ifde8db407f2fa8275a3f991bfa3d3b73eca8c14e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
		
				
					committed by
					
						
						Orgad Shaneh
					
				
			
			
				
	
			
			
			
						parent
						
							87f6b92e34
						
					
				
				
					commit
					9b3723d6f4
				
			@@ -1298,7 +1298,7 @@ bool CheckSymbols::maybeAddFunction(const QList<LookupItem> &candidates, NameAST
 | 
			
		||||
        Function *funTy = c->type()->asFunctionType();
 | 
			
		||||
        if (!funTy) // Template function has an overridden type
 | 
			
		||||
            funTy = r.type()->asFunctionType();
 | 
			
		||||
        if (!funTy)
 | 
			
		||||
        if (!funTy || funTy->isAmbiguous())
 | 
			
		||||
            continue; // TODO: add diagnostic messages and color call-operators calls too?
 | 
			
		||||
 | 
			
		||||
        if (argumentCount < funTy->minimumArgumentCount()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user