1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-09 19:43:27 +02:00

Patch for Bryan, Bug 179454 - Patch modifies CPPVisitor.createBinding(ICPPASTElaboratedTypeSpecifier) to

ignore IIndexBindings and forces it to create a new ICPPInternalBinding
instead.  This behaviour is already implemented in other
CPPVisitor.createBinding(...) methods.
This commit is contained in:
Doug Schaefer 2007-03-27 15:57:39 +00:00
parent 0c819191c7
commit b6f422c417

View file

@ -354,7 +354,7 @@ public class CPPVisitor {
} }
try { try {
binding = scope.getBinding( elabType.getName(), false ); binding = scope.getBinding( elabType.getName(), false );
if( binding == null || !(binding instanceof ICPPClassType) ){ if( !(binding instanceof ICPPInternalBinding) || !(binding instanceof ICPPClassType) ){
if( elabType.getKind() != IASTElaboratedTypeSpecifier.k_enum ){ if( elabType.getKind() != IASTElaboratedTypeSpecifier.k_enum ){
if( template ) if( template )
binding = new CPPClassTemplate( name ); binding = new CPPClassTemplate( name );
@ -362,7 +362,7 @@ public class CPPVisitor {
binding = new CPPClassType( name ); binding = new CPPClassType( name );
ASTInternal.addName( scope, elabType.getName() ); ASTInternal.addName( scope, elabType.getName() );
} }
} else if( binding instanceof ICPPInternalBinding ){ } else {
((ICPPInternalBinding)binding).addDeclaration( elabType ); ((ICPPInternalBinding)binding).addDeclaration( elabType );
} }
} catch ( DOMException e ) { } catch ( DOMException e ) {