1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix for 198257 by Emanuel Graf, missing leave call in GCCASTSimpleDeclSpecifier.accept().

This commit is contained in:
Markus Schorn 2007-07-31 07:35:32 +00:00
parent cd9c320af7
commit f1508c5bf4

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * 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 ){ public boolean accept( ASTVisitor action ){
if( action.shouldVisitDeclSpecifiers ){ if( action.shouldVisitDeclSpecifiers ){
switch( action.visit( this ) ){ switch( action.visit( this ) ){
case ASTVisitor.PROCESS_ABORT : return false; case ASTVisitor.PROCESS_ABORT : return false;
case ASTVisitor.PROCESS_SKIP : return true; case ASTVisitor.PROCESS_SKIP : return true;
default : break; default : break;
} }
} }
if( typeOfExpression != null ) if( typeOfExpression != null )
if( !typeOfExpression.accept( action ) ) return false; 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;
} }
} }