mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
bug 521820 - don't filter alias template for CPPASTNamedTypeSpecifier
Change-Id: Ie66b148aabaf7f73bb639359c46d3d2d974c305f Signed-off-by: Michael Woski <woskimi@yahoo.de>
This commit is contained in:
parent
feed2bbf85
commit
c5b4657220
2 changed files with 23 additions and 0 deletions
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.ICPPASTCompletionContext;
|
|||
import org.eclipse.cdt.core.dom.ast.IEnumeration;
|
||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPAliasTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
|
||||
|
@ -123,6 +124,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
|
|||
|| binding instanceof IEnumeration
|
||||
|| binding instanceof ICPPNamespace
|
||||
|| binding instanceof ITypedef
|
||||
|| binding instanceof ICPPAliasTemplate
|
||||
|| binding instanceof ICPPTemplateTypeParameter) {
|
||||
if (i != j)
|
||||
bindings[j] = binding;
|
||||
|
|
|
@ -1910,4 +1910,25 @@ public class CompletionTests extends CompletionTestBase {
|
|||
public void testInheritingConstructor_511653() throws Exception {
|
||||
assertCompletionResults(new String[] { "A;" });
|
||||
}
|
||||
|
||||
// template<int I>
|
||||
// struct A {
|
||||
//
|
||||
// struct Hello{};
|
||||
//
|
||||
// };
|
||||
//
|
||||
// struct B {
|
||||
//
|
||||
// template<int T>
|
||||
// using Test = A<T>;
|
||||
//
|
||||
// void main() {
|
||||
// Te/*cursor*/
|
||||
// }
|
||||
//
|
||||
// };
|
||||
public void testAliasTemplateTypeSpecifier_521820() throws Exception {
|
||||
assertCompletionResults(new String[] { "Test<>" });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue