Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2003-08-25 09:55:32 -0400
committerJohn Camelon2003-08-25 09:55:32 -0400
commitc55ebd35d11e5676a0ead722146f8e3a1586a346 (patch)
treed1419297a31e224edde521b25c7a2b62ba0408af
parent7c632b299cfd39f7d12ecada66d3dae8bbf3ff8e (diff)
downloadorg.eclipse.cdt-c55ebd35d11e5676a0ead722146f8e3a1586a346.tar.gz
org.eclipse.cdt-c55ebd35d11e5676a0ead722146f8e3a1586a346.tar.xz
org.eclipse.cdt-c55ebd35d11e5676a0ead722146f8e3a1586a346.zip
Patch for Bogdan Gheorghe.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java7
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java3
2 files changed, 7 insertions, 3 deletions
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;

Back to the top