From f1508c5bf400b3d6de779200151a93f3c0dd5dfc Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Tue, 31 Jul 2007 07:35:32 +0000 Subject: [PATCH] Fix for 198257 by Emanuel Graf, missing leave call in GCCASTSimpleDeclSpecifier.accept(). --- .../parser/c/GCCASTSimpleDeclSpecifier.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java index 1378e17d84b..48df23b4023 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. + * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Emanuel Graf IFS - Bugfix for #198257 *******************************************************************************/ /* @@ -51,14 +52,22 @@ public class GCCASTSimpleDeclSpecifier extends CASTSimpleDeclSpecifier public boolean accept( ASTVisitor action ){ if( action.shouldVisitDeclSpecifiers ){ switch( action.visit( this ) ){ - case ASTVisitor.PROCESS_ABORT : return false; - case ASTVisitor.PROCESS_SKIP : return true; - default : break; + case ASTVisitor.PROCESS_ABORT : return false; + case ASTVisitor.PROCESS_SKIP : return true; + default : break; } } if( typeOfExpression != null ) if( !typeOfExpression.accept( action ) ) return false; - return true; + if( action.shouldVisitDeclSpecifiers ){ + switch( action.leave( this ) ){ + case ASTVisitor.PROCESS_ABORT : return false; + case ASTVisitor.PROCESS_SKIP : return true; + default : break; + } + } + + return true; } }