forked from qt-creator/qt-creator
		
	C++: Fix Find Usages false positive results for function arguments
Code snippet: void bar(); // call find usages for bar from here void foo(int bar); // bar from here should not be in results Add test for member function false positives, that is part of QTCREATORBUG-2176. That was already fixed before. Fixes: QTCREATORBUG-2176 Change-Id: I9a079caa83bbaea1edb7ba6aeb151d4d4c77952f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
		@@ -2170,6 +2170,7 @@ bool FindUsages::visit(NestedDeclaratorAST *ast)
 | 
			
		||||
bool FindUsages::visit(FunctionDeclaratorAST *ast)
 | 
			
		||||
{
 | 
			
		||||
    // unsigned lparen_token = ast->lparen_token;
 | 
			
		||||
    Scope *previousScope = switchScope(ast->symbol);
 | 
			
		||||
    this->parameterDeclarationClause(ast->parameter_declaration_clause);
 | 
			
		||||
    // unsigned rparen_token = ast->rparen_token;
 | 
			
		||||
    for (SpecifierListAST *it = ast->cv_qualifier_list; it; it = it->next) {
 | 
			
		||||
@@ -2178,7 +2179,7 @@ bool FindUsages::visit(FunctionDeclaratorAST *ast)
 | 
			
		||||
    this->exceptionSpecification(ast->exception_specification);
 | 
			
		||||
    this->trailingReturnType(ast->trailing_return_type);
 | 
			
		||||
    this->expression(ast->as_cpp_initializer);
 | 
			
		||||
    // Function *symbol = ast->symbol;
 | 
			
		||||
    (void) switchScope(previousScope);
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user