diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java index 7d26fc5f33a..8679f34d328 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java @@ -314,8 +314,9 @@ public class CPPASTQualifiedName extends CPPASTNameBase ICPPClassType classQualifier = getClassQualifier(); if (classQualifier != null) { final boolean isDeclaration = getParent().getParent() instanceof IASTSimpleDeclaration; + final boolean isUsingDecl = getParent() instanceof ICPPASTUsingDeclaration; List filtered = filterClassScopeBindings(classQualifier, bindings, isDeclaration); - if (isDeclaration && nameMatches(classQualifier.getNameCharArray(), + if ((isDeclaration || isUsingDecl) && nameMatches(classQualifier.getNameCharArray(), n.getLookupKey(), isPrefix)) { ICPPConstructor[] constructors = ClassTypeHelper.getConstructors(classQualifier, n); for (int i = 0; i < constructors.length; i++) { diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java index d08b56dbee6..5332a111334 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java @@ -1868,4 +1868,14 @@ public class CompletionTests extends CompletionTestBase { public void testExistingParens_72391() throws Exception { assertCompletionResults(new String[] { "waldo" }); // expect no parens in replacement } + + // struct A{ + // A(int,int); + // }; + // struct B: A{ + // using A::/*cursor*/ + // }; + public void testInheritingConstructor_511653() throws Exception { + assertCompletionResults(new String[] { "A;" }); + } }