Community
Participate
Working Groups
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.
Fixed in HEAD > 20110204.
*** cdt cvs genie on behalf of sprigogin *** Bug 336123 - DefinitionFinder2 doesn't find function definitions [*] CPPVisitor.java 1.149 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java?root=Tools_Project&r1=1.148&r2=1.149 [+] DefinitionFinder.rts http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui.tests/resources/refactoring/DefinitionFinder.rts?root=Tools_Project&revision=1.1&view=markup [*] UtilTestSuite.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/UtilTestSuite.java?root=Tools_Project&r1=1.5&r2=1.6 [+] DefinitionFinderTest.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/DefinitionFinderTest.java?root=Tools_Project&revision=1.1&view=markup