From b6f422c417dff50c2830a2ae0be1f7509733ae67 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Tue, 27 Mar 2007 15:57:39 +0000 Subject: [PATCH] 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. --- .../eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java index 1a9e0470176..8cfdb65eb20 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java @@ -354,7 +354,7 @@ public class CPPVisitor { } try { 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( template ) binding = new CPPClassTemplate( name ); @@ -362,7 +362,7 @@ public class CPPVisitor { binding = new CPPClassType( name ); ASTInternal.addName( scope, elabType.getName() ); } - } else if( binding instanceof ICPPInternalBinding ){ + } else { ((ICPPInternalBinding)binding).addDeclaration( elabType ); } } catch ( DOMException e ) {