Project: Eclipse_Platform_UI
Bug 84703 [C++ getReferences] qualified name segments should use parent's property
Reported: 2005-02-08 11:01:55 | Status: resolved fixed

CPPASTQualifiedName#toCharArray returns the entire qualified name as a char[], but now getReferences uses a char[] comparison to determine if the IASTNames are the same or not. getReferences on IASTName: mutate below seems to have different behaviour relative to how the names are resolved (starting with qualified name definition or not). Regardless of how they are resolved the behaviour is incorrect now since CPPASTQualifiedName#toCharArray returns the qualified name of the definition. // example code taken from: C++ spec 3.8-5: struct B { void mutate(); }; struct D2 : B { void f(); }; void B::mutate() { // this shouldn't be a reference, but is found when getReferences is done on this IASTName new (this) D2; } void g() { void* p = malloc(sizeof(D2)); B* pb = new (p) D1; pb->mutate(); // this reference is not picked up }

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/PerspectiveParameterValues.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/PerspectiveMenu.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ws/ShowPerspectiveHandler.java