mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix compile errors
This commit is contained in:
parent
26c0a92a71
commit
ed6faa6fc9
4 changed files with 23 additions and 29 deletions
|
@ -1362,9 +1362,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||||
if(identifierType instanceof IFunctionType) {
|
if(identifierType instanceof IFunctionType) {
|
||||||
// TODO: check the parameter types
|
// TODO: check the parameter types
|
||||||
IFunctionType functionType = (IFunctionType)identifierType;
|
IFunctionType functionType = (IFunctionType)identifierType;
|
||||||
try {
|
|
||||||
resultType = functionType.getReturnType();
|
resultType = functionType.getReturnType();
|
||||||
} catch (DOMException e) { } // do nothing, the problem binding is fine
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exprTypeStack.push(resultType);
|
exprTypeStack.push(resultType);
|
||||||
|
@ -1391,9 +1390,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||||
IType resultType = C99ProblemBinding.badType();
|
IType resultType = C99ProblemBinding.badType();
|
||||||
if(exprType instanceof IArrayType) {
|
if(exprType instanceof IArrayType) {
|
||||||
IArrayType arrType = (IArrayType) exprType;
|
IArrayType arrType = (IArrayType) exprType;
|
||||||
try {
|
|
||||||
resultType = arrType.getType(); // strip off the array type
|
resultType = arrType.getType(); // strip off the array type
|
||||||
} catch (DOMException e) { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exprTypeStack.push(resultType);
|
exprTypeStack.push(resultType);
|
||||||
|
|
|
@ -71,14 +71,13 @@ public class C99PointerType implements ITypeContainer, ICPointerType {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (t instanceof ICPointerType) {
|
if (t instanceof ICPointerType) {
|
||||||
try {
|
|
||||||
ICPointerType pointerType = (ICPointerType) t;
|
ICPointerType pointerType = (ICPointerType) t;
|
||||||
if(pointerType.isConst() == isConst &&
|
if(pointerType.isConst() == isConst &&
|
||||||
pointerType.isRestrict() == isRestrict &&
|
pointerType.isRestrict() == isRestrict &&
|
||||||
pointerType.isVolatile() == isVolatile) {
|
pointerType.isVolatile() == isVolatile) {
|
||||||
return type.isSameType(pointerType.getType());
|
return type.isSameType(pointerType.getType());
|
||||||
}
|
}
|
||||||
} catch(DOMException _) { }
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,14 +76,14 @@ public class C99QualifierType implements ICQualifierType, ITypeContainer {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (t instanceof ICQualifierType) {
|
if (t instanceof ICQualifierType) {
|
||||||
try {
|
|
||||||
ICQualifierType pointerType = (ICQualifierType) t;
|
ICQualifierType pointerType = (ICQualifierType) t;
|
||||||
if(pointerType.isConst() == isConst &&
|
if(pointerType.isConst() == isConst &&
|
||||||
pointerType.isRestrict() == isRestrict &&
|
pointerType.isRestrict() == isRestrict &&
|
||||||
pointerType.isVolatile() == isVolatile) {
|
pointerType.isVolatile() == isVolatile) {
|
||||||
return type.isSameType(pointerType.getType());
|
return type.isSameType(pointerType.getType());
|
||||||
}
|
}
|
||||||
} catch(DOMException _) { }
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,13 +69,10 @@ public class C99Typedef extends PlatformObject implements IC99Binding, ITypedef,
|
||||||
if(t == this)
|
if(t == this)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
try {
|
|
||||||
if(t instanceof ITypedef)
|
if(t instanceof ITypedef)
|
||||||
return type.isSameType(((ITypedef)t).getType());
|
return type.isSameType(((ITypedef)t).getType());
|
||||||
return type.isSameType(t);
|
return type.isSameType(t);
|
||||||
} catch(DOMException _) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue