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:
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) {
|
||||
// TODO: check the parameter types
|
||||
IFunctionType functionType = (IFunctionType)identifierType;
|
||||
try {
|
||||
resultType = functionType.getReturnType();
|
||||
} catch (DOMException e) { } // do nothing, the problem binding is fine
|
||||
|
||||
}
|
||||
|
||||
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) { }
|
||||
|
||||
}
|
||||
|
||||
exprTypeStack.push(resultType);
|
||||
|
|
|
@ -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 _) { }
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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 _) { }
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue