From 83c0dabdbddd5f6d19318b27cef2c5325c76ced3 Mon Sep 17 00:00:00 2001 From: Andrew Niefer Date: Wed, 7 Apr 2004 14:24:42 +0000 Subject: [PATCH] changes for parsing iostream in a standard project with discovered symbols --- core/org.eclipse.cdt.core/parser/ChangeLog-parser | 6 ++++++ .../eclipse/cdt/internal/core/parser/ExpressionParser.java | 3 +++ .../internal/core/parser/scanner/GCCScannerExtension.java | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog-parser b/core/org.eclipse.cdt.core/parser/ChangeLog-parser index 1977c9042f7..454abad5871 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog-parser +++ b/core/org.eclipse.cdt.core/parser/ChangeLog-parser @@ -1,3 +1,9 @@ +2004-04-07 Andrew Niefer + small changes to get through iostream under standard make with discovered symbols + - check null pointer in GCCScannerExtension.handlePreprocessorDirective, the null is probably a symptom of whatever + is giving us an unbalanced preprocessor directive + - catch exceptions during our 3rd attempt at a template argument in ExpressionParser.templateArgumentList + 2004-04-07 John Camelon Provided a partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=50152 Updated IExpressionParser::expression() interface necessitated by this fix, and updated its clients appropriately. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ExpressionParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ExpressionParser.java index f08aa769ba0..ab90e6b13ac 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ExpressionParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ExpressionParser.java @@ -211,6 +211,9 @@ public class ExpressionParser implements IExpressionParser { }catch( BacktrackException e ){ failed = true; break; + }catch( Exception e ){ + failed = true; + break; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/GCCScannerExtension.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/GCCScannerExtension.java index 0463bff8203..cd60b164448 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/GCCScannerExtension.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/GCCScannerExtension.java @@ -112,7 +112,7 @@ public class GCCScannerExtension implements IScannerExtension { TraceUtil.outputTrace(scannerData.getLogService(), "GCCScannerExtension handling #include_next directive", null, null, null, null); //$NON-NLS-1$ // figure out the name of the current file and its path IScannerContext context = scannerData.getContextStack().getCurrentContext(); - if( context.getKind() != IScannerContext.ContextKind.INCLUSION ) + if( context == null || context.getKind() != IScannerContext.ContextKind.INCLUSION ) return; String fullInclusionPath = context.getFilename();