mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 142713 - For some reason the number of template parameters in this code was smaller than expected. Could be due to some unimplemented methods in the PDOM, but I'm not sure of that. At any rate, I've added a check to skip over the tempate if the number of parameters wasn't large enough.
This commit is contained in:
parent
ce45b4750e
commit
f721770c5e
1 changed files with 8 additions and 6 deletions
|
@ -199,18 +199,20 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
|
|||
else
|
||||
binding = new CPPTemplateTemplateParameter( name );
|
||||
|
||||
ICPPASTTemplateParameter temp = null;
|
||||
ICPPASTTemplateDeclaration template = null;
|
||||
int length = ( declarations != null ) ? declarations.length : 0;
|
||||
int j = ( definition != null ) ? -1 : 0;
|
||||
for( ; j < length; j++ ){
|
||||
template = ( j == -1 ) ? CPPTemplates.getTemplateDeclaration( definition )
|
||||
: CPPTemplates.getTemplateDeclaration( declarations[j] );
|
||||
ICPPASTTemplateDeclaration template = ( j == -1 )
|
||||
? CPPTemplates.getTemplateDeclaration( definition )
|
||||
: CPPTemplates.getTemplateDeclaration( declarations[j] );
|
||||
if( template == null )
|
||||
continue;
|
||||
temp = template.getTemplateParameters()[i];
|
||||
|
||||
ICPPASTTemplateParameter[] temp = template.getTemplateParameters();
|
||||
if (temp.length <= i)
|
||||
continue;
|
||||
|
||||
IASTName n = CPPTemplates.getTemplateParameterName( temp );
|
||||
IASTName n = CPPTemplates.getTemplateParameterName(temp[i]);
|
||||
if( n != null && n != name && n.getBinding() == null ) {
|
||||
n.setBinding( binding );
|
||||
if( binding instanceof ICPPInternalBinding )
|
||||
|
|
Loading…
Add table
Reference in a new issue