From 9801ce290073db7784b1184c471d1effa768f3c0 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Wed, 2 Feb 2005 18:54:44 +0000 Subject: [PATCH] Remove IllegalOperationException. --- .../internal/core/dom/parser/AbstractGNUSourceCodeParser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index 4b25c5ceff4..259145649ef 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -471,6 +471,8 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { ((ASTNode) p).getLength()); p.setParent(ps); p.setPropertyInParent(IASTProblemHolder.PROBLEM); + if (statements == Collections.EMPTY_LIST) + statements = new ArrayList(DEFAULT_COMPOUNDSTATEMENT_LIST_SIZE); statements.add(ps); if (LA(1).hashCode() == checkToken) failParseWithErrorHandling();