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

Code formatting.

This commit is contained in:
Sergey Prigogin 2008-12-26 04:20:37 +00:00
parent 6ea85657c4
commit fb3b1587e1
4 changed files with 13 additions and 13 deletions

View file

@ -86,8 +86,7 @@ public class ASTTypeUtil {
if (parameters.length == 0) {
return false;
} else if (parameters.length == 1) {
IType ultimateType = SemanticUtil
.getUltimateTypeViaTypedefs(parameters[0].getType());
IType ultimateType = SemanticUtil.getUltimateTypeViaTypedefs(parameters[0].getType());
if (ultimateType instanceof IBasicType) {
if (((IBasicType) ultimateType).getType() == IBasicType.t_void) {
@ -514,7 +513,7 @@ public class ASTTypeUtil {
*/
public static String getType(IASTDeclarator decltor) {
// get the most nested declarator
while(decltor.getNestedDeclarator() != null)
while (decltor.getNestedDeclarator() != null)
decltor = decltor.getNestedDeclarator();
IBinding binding = decltor.getName().resolveBinding();
@ -559,7 +558,9 @@ public class ASTTypeUtil {
return getType((IType)((IASTName) node).resolveBinding());
if (node instanceof IASTTypeId)
return getType((IASTTypeId) node);
} catch (DOMException e) { return EMPTY_STRING; }
} catch (DOMException e) {
return EMPTY_STRING;
}
return EMPTY_STRING;
}
@ -681,8 +682,7 @@ public class ASTTypeUtil {
IASTNode node= null;
if (binding instanceof ICInternalBinding) {
node= ((ICInternalBinding) binding).getPhysicalNode();
}
else if (binding instanceof ICPPInternalBinding) {
} else if (binding instanceof ICPPInternalBinding) {
node= ((ICPPInternalBinding) binding).getDefinition();
}
if (node != null) {

View file

@ -2039,8 +2039,9 @@ public class CPPSemantics {
return null;
if (data.forFunctionDeclaration())
return firstViable;
final IType[] sourceParameters = getSourceParameterTypes(data.functionParameters); // the parameters the function is being called with
// The parameters the function is being called with
final IType[] sourceParameters = getSourceParameterTypes(data.functionParameters);
if (CPPTemplates.containsDependentType(sourceParameters)) {
if (viableCount == 1)
return firstViable;

View file

@ -22,20 +22,19 @@ public class CompositeFunctionType extends CompositeType implements IFunctionTyp
}
public IType[] getParameterTypes() throws DOMException {
IType[] result = ((IFunctionType)type).getParameterTypes();
for(int i=0; i<result.length; i++) {
IType[] result = ((IFunctionType) type).getParameterTypes();
for (int i = 0; i < result.length; i++) {
result[i] = cf.getCompositeType((IIndexType)result[i]);
}
return result;
}
public IType getReturnType() throws DOMException {
return cf.getCompositeType((IIndexType)((IFunctionType)type).getReturnType());
return cf.getCompositeType((IIndexType) ((IFunctionType) type).getReturnType());
}
@Override
public boolean isSameType(IType other) {
return type.isSameType(other);
}
}

View file

@ -24,7 +24,7 @@ public class CompositeTypeContainer extends CompositeType implements ITypeContai
}
public final IType getType() throws DOMException {
return cf.getCompositeType((IIndexType)((ITypeContainer)type).getType());
return cf.getCompositeType((IIndexType) ((ITypeContainer) type).getType());
}
@Override