1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

fix ClassCastException for bug 95215

fix open declaration on template template parameter for bug 95221
This commit is contained in:
Andrew Niefer 2005-05-13 20:21:32 +00:00
parent 793e00edda
commit 6ccc4b4462
3 changed files with 11 additions and 8 deletions

View file

@ -130,9 +130,9 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases()
*/
public ICPPBase[] getBases() throws DOMException {
public ICPPBase[] getBases() {
// TODO Auto-generated method stub
return null;
return ICPPBase.EMPTY_BASE_ARRAY;
}
/* (non-Javadoc)
@ -186,9 +186,8 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors()
*/
public ICPPConstructor[] getConstructors() throws DOMException {
// TODO Auto-generated method stub
return null;
public ICPPConstructor[] getConstructors() {
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
}
/* (non-Javadoc)

View file

@ -439,7 +439,11 @@ public class CPPTemplates {
if( name.getParent() instanceof IASTName )
name = (IASTName) name.getParent();
ICPPASTFunctionDeclarator fdtor = (ICPPASTFunctionDeclarator) name.getParent();
IASTNode n = name.getParent();
if( n instanceof ICPPASTQualifiedName ){
n = n.getParent();
}
ICPPASTFunctionDeclarator fdtor = (ICPPASTFunctionDeclarator) n;
IType [] functionParameters = createTypeArray( fdtor.getParameters() );
ICPPFunctionTemplate result = null;

View file

@ -988,6 +988,8 @@ public class CPPVisitor {
shouldVisitNames = true;
if( binding instanceof ILabel )
kind = KIND_LABEL;
else if( binding instanceof ICPPTemplateParameter )
kind = KIND_TEMPLATE_PARAMETER;
else if( binding instanceof ICompositeType ||
binding instanceof ITypedef ||
binding instanceof IEnumeration)
@ -999,8 +1001,6 @@ public class CPPVisitor {
}
else if( binding instanceof ICPPUsingDeclaration )
kind = KIND_COMPOSITE;
else if( binding instanceof ICPPTemplateParameter )
kind = KIND_TEMPLATE_PARAMETER;
else
kind = KIND_OBJ_FN;
}