diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java index 0be9a560ea1..296e9a1ba47 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java @@ -340,9 +340,10 @@ public class Scanner implements IScanner { handleInclusion( fileName, true, nameOffset, beginOffset, endOffset ); } } - - IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, endOffset, nameOffset ); - contextStack.updateContext(inclusionReader, newPath, ScannerContext.INCLUSION, inclusion, requestor ); + if (inclusionReader != null) { + IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, endOffset, nameOffset ); + contextStack.updateContext(inclusionReader, newPath, ScannerContext.INCLUSION, inclusion, requestor ); + } } // constants diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java index c217eab293e..01deaea5f04 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java @@ -900,6 +900,9 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto */ protected void setParameter(IParameterizedSymbol symbol, IASTAbstractDeclaration absDecl, boolean isParameter, List references) throws ASTSemanticException { + if (absDecl.getTypeSpecifier() == null) + return; + TypeInfo.eType type = null; ISymbol xrefSymbol = null; List newReferences = null;