diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java index 43062a9da00..70a6cc6ecb5 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java @@ -209,6 +209,6 @@ public class NamespaceTests extends PDOMTestBase { assertEquals(0, decls.length); IName[] refs = pdom.findNames(variable1, IIndex.FIND_REFERENCES); - assertEquals(3, refs.length); + assertEquals(2, refs.length); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java index 86812964a88..d6fa4511b9c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java @@ -18,8 +18,6 @@ import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.ast.IASTFileLocation; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration; import org.eclipse.cdt.core.index.IIndexFile; import org.eclipse.cdt.core.index.IIndexName; import org.eclipse.cdt.core.index.IndexLocationFactory; @@ -79,17 +77,6 @@ public final class PDOMName implements IIndexFragmentName, IASTFileLocation { break; case IS_DECLARATION: binding.addDeclaration(this); - - // The name of a using-declaration is, in addition to the declaration of - // the using-declaration binding, a reference to its delegate bindings. - if (binding instanceof ICPPUsingDeclaration) { - for (IBinding delegate : ((ICPPUsingDeclaration) binding).getDelegates()) { - if (delegate instanceof PDOMBinding) { - ((PDOMBinding) delegate).addReference(this); - } - } - } - break; case IS_REFERENCE: binding.addReference(this); diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/FindReferencesTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/FindReferencesTest.java index 559caaccd50..0dd3aa7cff9 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/FindReferencesTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/FindReferencesTest.java @@ -126,17 +126,6 @@ public class FindReferencesTest extends SearchTestBase { assertNotNull(matches[0].getEnclosingElement()); } - // namespace N { - // void foo(); - // } - // using N::foo; - - // // empty file - public void testUsingDeclaration_399147() throws Exception { - CSearchQuery query = makeSearchQuery(fHeaderFile, selectSection("foo", "void foo", fHeaderContents)); - assertOccurrences(query, 1); - } - // // empty file // namespace { struct A {}; }