forked from qt-creator/qt-creator
		
	C++: Find template member access in find usages
Example:
struct Foo {};
struct Bar {
  template <typename T>
  T *templateFunc() { return 0; }
};
struct Test {
  Bar member;
  void testFunc();
};
void Test::testFunc() {
  member.templateFunc<Foo>();   // "templateFunc" and "Foo" outside of FindUsages
}
Change-Id: I0c5109d00c67054fe15b3fb98cf8cbca69123d8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
			
			
This commit is contained in:
		@@ -2125,10 +2125,12 @@ bool FindUsages::visit(MemberAccessAST *ast)
 | 
			
		||||
 | 
			
		||||
    if (ast->member_name) {
 | 
			
		||||
        if (SimpleNameAST *simple = ast->member_name->asSimpleName()) {
 | 
			
		||||
            if (identifier(simple->identifier_token) == _id) {
 | 
			
		||||
            if (identifier(simple->identifier_token) == _id)
 | 
			
		||||
                checkExpression(ast->firstToken(), simple->identifier_token);
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
        } else if (TemplateIdAST *templateId = ast->member_name->asTemplateId()) {
 | 
			
		||||
            if (identifier(templateId->identifier_token) == _id)
 | 
			
		||||
                checkExpression(ast->firstToken(), templateId->identifier_token);
 | 
			
		||||
            accept(templateId->template_argument_list);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user