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

Bug 496657 - Fix an ArrayOutOfBoundsException during indexing

Change-Id: Iee0617407bf59016dae26b2483dfc9d68ff84451
This commit is contained in:
Nathan Ridge 2016-06-23 16:15:52 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent f38cbb85c3
commit afb47aa104

View file

@ -282,7 +282,10 @@ public class EvalUnary extends CPPDependentEvaluation {
ICPPFunction overload = getOverload(point);
if (overload != null) {
ICPPFunctionType functionType = overload.getType();
IType targetType = functionType.getParameterTypes()[0];
IType[] parameterTypes = functionType.getParameterTypes();
if (parameterTypes.length == 0)
return Value.ERROR;
IType targetType = parameterTypes[0];
arg = maybeApplyConversion(arg, targetType, point);
if (!(overload instanceof CPPImplicitFunction)) {