mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Cosmetics.
This commit is contained in:
parent
5adfb67a9d
commit
ff8baa2754
2 changed files with 30 additions and 37 deletions
|
@ -48,7 +48,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
|
||||||
|
|
||||||
private static final int FULLY_RESOLVED = 1;
|
private static final int FULLY_RESOLVED = 1;
|
||||||
private static final int RESOLUTION_IN_PROGRESS = 1 << 1;
|
private static final int RESOLUTION_IN_PROGRESS = 1 << 1;
|
||||||
private int bits = 0;
|
private int bits;
|
||||||
|
|
||||||
protected IFunctionType type;
|
protected IFunctionType type;
|
||||||
|
|
||||||
|
@ -112,9 +112,6 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IParameter[] getParameters() {
|
public IParameter[] getParameters() {
|
||||||
int j= -1;
|
int j= -1;
|
||||||
|
@ -140,8 +137,8 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
|
||||||
IASTName[] names = ((ICASTKnRFunctionDeclarator) dtor).getParameterNames();
|
IASTName[] names = ((ICASTKnRFunctionDeclarator) dtor).getParameterNames();
|
||||||
IParameter[] result = new IParameter[names.length];
|
IParameter[] result = new IParameter[names.length];
|
||||||
if (names.length > 0) {
|
if (names.length > 0) {
|
||||||
// Ensures that the list of parameters is created in the same order as the K&R C parameter
|
// Ensures that the list of parameters is created in the same order as
|
||||||
// names
|
// the K&R C parameter names
|
||||||
for (int i = 0; i < names.length; i++) {
|
for (int i = 0; i < names.length; i++) {
|
||||||
IASTDeclarator decl = CVisitor.getKnRParameterDeclarator(
|
IASTDeclarator decl = CVisitor.getKnRParameterDeclarator(
|
||||||
(ICASTKnRFunctionDeclarator) dtor, names[i]);
|
(ICASTKnRFunctionDeclarator) dtor, names[i]);
|
||||||
|
|
|
@ -42,24 +42,20 @@ public class CFunctionType implements IFunctionType, ISerializableType {
|
||||||
return false;
|
return false;
|
||||||
if (!returnType.isSameType(ft.getReturnType()))
|
if (!returnType.isSameType(ft.getReturnType()))
|
||||||
return false;
|
return false;
|
||||||
for( int i = 0; i < parameters.length; i++ )
|
for (int i = 0; i < parameters.length; i++) {
|
||||||
if (!parameters[i].isSameType(fps[i]))
|
if (!parameters[i].isSameType(fps[i]))
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IFunctionType#getReturnType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IType getReturnType() {
|
public IType getReturnType() {
|
||||||
return returnType;
|
return returnType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IFunctionType#getParameterTypes()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IType[] getParameterTypes() {
|
public IType[] getParameterTypes() {
|
||||||
return parameters;
|
return parameters;
|
||||||
|
|
Loading…
Add table
Reference in a new issue