Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336123

Summary: DefinitionFinder2 doesn't find function definitions
Product: [Tools] CDT Reporter: Marc-AndrĂ© Laperle <malaperle>
Component: cdt-refactoringAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Emanuel Graf <emanuel>
Severity: normal    
Priority: P3 CC: cdtdoug, eclipse.sprigogin
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 292851    
Attachments:
Description Flags
DefinitionFinder function testcase eclipse.sprigogin: iplog+

Description Marc-André Laperle CLA 2011-02-02 13:13:21 EST
Created attachment 188175 [details]
DefinitionFinder function testcase

Example:

//A.h
#ifndef A_H_
#define A_H_

void foo();

#endif

//A.cpp
#include "A.h"

void foo()
{

}

It seems CPPVisitor.CollectDeclarationsAction.isDeclarationsBinding is comparing a PDOMCPPFunction (obtained with adaptBinding) and a CPPFunction (from the AST).

Using DefinitionFinder on a function is useful for implement method.

Attached is a simple test case to illustrate the problem.
Comment 1 Sergey Prigogin CLA 2011-02-04 21:51:19 EST
Fixed in HEAD > 20110204.