1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

fix compile errors

This commit is contained in:
Mike Kucera 2009-07-16 20:08:04 +00:00
parent 26c0a92a71
commit ed6faa6fc9
4 changed files with 23 additions and 29 deletions

View file

@ -1362,9 +1362,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
if(identifierType instanceof IFunctionType) {
// TODO: check the parameter types
IFunctionType functionType = (IFunctionType)identifierType;
try {
resultType = functionType.getReturnType();
} catch (DOMException e) { } // do nothing, the problem binding is fine
resultType = functionType.getReturnType();
}
exprTypeStack.push(resultType);
@ -1391,9 +1390,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
IType resultType = C99ProblemBinding.badType();
if(exprType instanceof IArrayType) {
IArrayType arrType = (IArrayType) exprType;
try {
resultType = arrType.getType(); // strip off the array type
} catch (DOMException e) { }
resultType = arrType.getType(); // strip off the array type
}
exprTypeStack.push(resultType);

View file

@ -71,14 +71,13 @@ public class C99PointerType implements ITypeContainer, ICPointerType {
return true;
if (t instanceof ICPointerType) {
try {
ICPointerType pointerType = (ICPointerType) t;
if(pointerType.isConst() == isConst &&
pointerType.isRestrict() == isRestrict &&
pointerType.isVolatile() == isVolatile) {
return type.isSameType(pointerType.getType());
}
} catch(DOMException _) { }
ICPointerType pointerType = (ICPointerType) t;
if(pointerType.isConst() == isConst &&
pointerType.isRestrict() == isRestrict &&
pointerType.isVolatile() == isVolatile) {
return type.isSameType(pointerType.getType());
}
}
return false;
}

View file

@ -76,14 +76,14 @@ public class C99QualifierType implements ICQualifierType, ITypeContainer {
return true;
if (t instanceof ICQualifierType) {
try {
ICQualifierType pointerType = (ICQualifierType) t;
if(pointerType.isConst() == isConst &&
pointerType.isRestrict() == isRestrict &&
pointerType.isVolatile() == isVolatile) {
return type.isSameType(pointerType.getType());
}
} catch(DOMException _) { }
ICQualifierType pointerType = (ICQualifierType) t;
if(pointerType.isConst() == isConst &&
pointerType.isRestrict() == isRestrict &&
pointerType.isVolatile() == isVolatile) {
return type.isSameType(pointerType.getType());
}
}
return false;
}

View file

@ -69,13 +69,10 @@ public class C99Typedef extends PlatformObject implements IC99Binding, ITypedef,
if(t == this)
return true;
try {
if(t instanceof ITypedef)
return type.isSameType(((ITypedef)t).getType());
return type.isSameType(t);
} catch(DOMException _) {
return false;
}
if(t instanceof ITypedef)
return type.isSameType(((ITypedef)t).getType());
return type.isSameType(t);
}
@Override