mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 496657 - Fix an ArrayOutOfBoundsException during indexing
Change-Id: Iee0617407bf59016dae26b2483dfc9d68ff84451
This commit is contained in:
parent
f38cbb85c3
commit
afb47aa104
1 changed files with 4 additions and 1 deletions
|
@ -282,7 +282,10 @@ public class EvalUnary extends CPPDependentEvaluation {
|
||||||
ICPPFunction overload = getOverload(point);
|
ICPPFunction overload = getOverload(point);
|
||||||
if (overload != null) {
|
if (overload != null) {
|
||||||
ICPPFunctionType functionType = overload.getType();
|
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);
|
arg = maybeApplyConversion(arg, targetType, point);
|
||||||
|
|
||||||
if (!(overload instanceof CPPImplicitFunction)) {
|
if (!(overload instanceof CPPImplicitFunction)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue