1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-29 19:23:38 +02:00

Fixed a couple of exceptions when fast indexing ACE&TAO.

This commit is contained in:
Doug Schaefer 2006-05-03 18:10:40 +00:00
parent fc8276028d
commit 3f989cc33f
2 changed files with 11 additions and 4 deletions

View file

@ -82,7 +82,9 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
ICPPClassType clsType = (ICPPClassType) binding; ICPPClassType clsType = (ICPPClassType) binding;
if( clsType instanceof ICPPClassTemplate ){ if( clsType instanceof ICPPClassTemplate ){
try { try {
clsType = (ICPPClassType) CPPTemplates.instantiateWithinClassTemplate( (ICPPClassTemplate) clsType ); IBinding within = CPPTemplates.instantiateWithinClassTemplate( (ICPPClassTemplate) clsType );
if (within instanceof ICPPClassType)
clsType = (ICPPClassType)within;
} catch ( DOMException e ) { } catch ( DOMException e ) {
} }
} }

View file

@ -1228,8 +1228,11 @@ public class CPPSemantics {
if( data.visited == ObjectSet.EMPTY_SET ) if( data.visited == ObjectSet.EMPTY_SET )
data.visited = new ObjectSet(2); data.visited = new ObjectSet(2);
IBinding b = bases[i].getBaseClass(); IBinding b = bases[i].getBaseClass();
if( b instanceof ICPPClassType ) if( b instanceof ICPPClassType ) {
data.visited.put( ((ICPPClassType)b).getCompositeScope() ); IScope bScope = ((ICPPClassType)b).getCompositeScope();
if (bScope != null)
data.visited.put(bScope);
}
} else { } else {
IBinding b = bases[i].getBaseClass(); IBinding b = bases[i].getBaseClass();
if( b instanceof ICPPClassType ) if( b instanceof ICPPClassType )
@ -2150,7 +2153,9 @@ public class CPPSemantics {
cls = new CPPClassType.CPPClassTypeProblem( scope.getPhysicalNode(), IProblemBinding.SEMANTIC_BAD_SCOPE, fn.getNameCharArray() ); cls = new CPPClassType.CPPClassTypeProblem( scope.getPhysicalNode(), IProblemBinding.SEMANTIC_BAD_SCOPE, fn.getNameCharArray() );
} }
if( cls instanceof ICPPClassTemplate ){ if( cls instanceof ICPPClassTemplate ){
cls = (ICPPClassType) CPPTemplates.instantiateWithinClassTemplate( (ICPPClassTemplate) cls ); IBinding within = CPPTemplates.instantiateWithinClassTemplate( (ICPPClassTemplate) cls );
if (within instanceof ICPPClassType)
cls = (ICPPClassType)within;
} }
IType implicitType = cls; IType implicitType = cls;
if( ftype.isConst() || ftype.isVolatile() ){ if( ftype.isConst() || ftype.isVolatile() ){