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:
parent
59dd370291
commit
46903cc52f
1 changed files with 8 additions and 5 deletions
|
@ -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 ){
|
||||
|
|
Loading…
Add table
Reference in a new issue