1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 164972 - Fix handling when f(void) is used in a decl and f() in the def.

This commit is contained in:
Doug Schaefer 2006-11-17 15:59:44 +00:00
parent 59dd370291
commit 46903cc52f

View file

@ -368,11 +368,14 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
binding = new CPPParameter( name );
IASTParameterDeclaration temp = null;
if( definition != null ){
temp = definition.getParameters()[i];
IASTName n = temp.getDeclarator().getName();
if( n != name ) {
n.setBinding( binding );
((CPPParameter)binding).addDeclaration( n );
IASTParameterDeclaration[] paramDecls = definition.getParameters();
if (paramDecls.length > i) { // This will be less than i if we have a void parameter
temp = paramDecls[i];
IASTName n = temp.getDeclarator().getName();
if( n != name ) {
n.setBinding( binding );
((CPPParameter)binding).addDeclaration( n );
}
}
}
if( declarations != null ){