mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 522459 - NPE in ExecRangeBasedFor.loopOverArray()
Change-Id: Ife66cef5ca07655371bf83489881d9f2baf61f92
This commit is contained in:
parent
f849b09679
commit
2a94c46209
1 changed files with 3 additions and 0 deletions
|
@ -133,6 +133,9 @@ public class ExecRangeBasedFor implements ICPPExecution {
|
|||
ICPPEvaluation valueRange = initClauseEval.computeForFunctionCall(record, context.recordStep());
|
||||
ExecDeclarator declaratorExec = (ExecDeclarator) declarationExec.getDeclaratorExecutions()[0];
|
||||
IVariable rangeVar = (IVariable) declaratorExec.getDeclaredBinding();
|
||||
if (rangeVar == null) {
|
||||
return ExecIncomplete.INSTANCE;
|
||||
}
|
||||
|
||||
boolean rangeIsConst = SemanticUtil.isConst(initClauseEval.getType(context.getPoint()));
|
||||
IType type = SemanticUtil.getNestedType(valueRange.getType(context.getPoint()), ALLCVQ | TDEF | REF);
|
||||
|
|
Loading…
Add table
Reference in a new issue