Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62149 Details for
Bug 179173
Exceptions in indexer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch for exceptions 1 and 3
patch179173v1.txt (text/plain), 7.70 KB, created by
Bryan Wilkinson
on 2007-03-27 16:06:34 EDT
(
hide
)
Description:
patch for exceptions 1 and 3
Filename:
MIME Type:
Creator:
Bryan Wilkinson
Created:
2007-03-27 16:06:34 EDT
Size:
7.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.core >Index: parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java,v >retrieving revision 1.8 >diff -u -r1.8 CPPClassSpecialization.java >--- parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java 24 Mar 2007 03:50:31 -0000 1.8 >+++ parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java 27 Mar 2007 20:01:36 -0000 >@@ -78,7 +78,7 @@ > ICPPBase[] bindings = ((ICPPClassType)getSpecializedBinding()).getBases(); > for (int i = 0; i < bindings.length; i++) { > IBinding base = bindings[i].getBaseClass(); >- if (base instanceof IType) { >+ if (bindings[i] instanceof CPPBaseClause && base instanceof IType) { > IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap); > ((CPPBaseClause)bindings[i]).setBaseClass((ICPPClassType)specBase); > } >Index: parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java,v >retrieving revision 1.142 >diff -u -r1.142 CPPVisitor.java >--- parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java 27 Mar 2007 15:57:39 -0000 1.142 >+++ parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java 27 Mar 2007 20:01:36 -0000 >@@ -573,6 +573,19 @@ > } > } > >+ if (binding instanceof IIndexBinding) { >+ ICPPASTTemplateDeclaration templateDecl = CPPTemplates.getTemplateDeclaration(name); >+ if (templateDecl != null) { >+ ICPPASTTemplateParameter[] params = templateDecl.getTemplateParameters(); >+ for (int i = 0; i < params.length; i++) { >+ IASTName paramName = CPPTemplates.getTemplateParameterName(params[i]); >+ paramName.setBinding(null); >+ //unsetting the index bindings so that they >+ //can be re-resolved with normal bindings >+ } >+ } >+ } >+ > if( scope instanceof ICPPClassScope ){ > if( isConstructor( scope, declarator) ) > binding = template ? (ICPPConstructor) new CPPConstructorTemplate( name ) >Index: parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplates.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplates.java,v >retrieving revision 1.25 >diff -u -r1.25 CPPTemplates.java >--- parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplates.java 19 Mar 2007 21:05:44 -0000 1.25 >+++ parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplates.java 27 Mar 2007 20:01:36 -0000 >@@ -382,8 +382,9 @@ > } > } > >- if( spec != null ){ >- ((ICPPInternalBinding)spec).addDefinition( id ); >+ if (spec != null) { >+ if( spec instanceof ICPPInternalBinding ) >+ ((ICPPInternalBinding)spec).addDefinition( id ); > return spec; > } > >@@ -435,11 +436,11 @@ > > ICPPSpecialization spec = null; > if( parent.getParent() instanceof ICPPASTExplicitTemplateInstantiation ){ >- spec = ((ICPPInternalTemplate)function).getInstance( (IType[])map_types[1] ); >+ spec = ((ICPPInternalTemplateInstantiator)function).getInstance( (IType[])map_types[1] ); > if( spec == null ) > spec = (ICPPSpecialization) CPPTemplates.createInstance( scope, function, (ObjectMap)map_types[0], (IType[])map_types[1] ); > } else { >- spec = ((ICPPInternalTemplate)function).getInstance( (IType[])map_types[1] ); >+ spec = ((ICPPInternalTemplateInstantiator)function).getInstance( (IType[])map_types[1] ); > if( spec == null ) { > if( function instanceof ICPPConstructor ) > spec = new CPPConstructorSpecialization( function, scope, (ObjectMap) map_types[0] ); >@@ -449,12 +450,15 @@ > spec = new CPPFunctionSpecialization( function, scope, (ObjectMap) map_types[0] ); > } > >- if( parent instanceof IASTSimpleDeclaration ) >- ((ICPPInternalBinding)spec).addDeclaration( name ); >- else if( parent instanceof IASTFunctionDefinition ) >- ((ICPPInternalBinding)spec).addDefinition( name ); >+ if (spec instanceof ICPPInternalBinding) { >+ if( parent instanceof IASTSimpleDeclaration ) >+ ((ICPPInternalBinding)spec).addDeclaration( name ); >+ else if( parent instanceof IASTFunctionDefinition ) >+ ((ICPPInternalBinding)spec).addDefinition( name ); >+ } > } >- ((ICPPInternalTemplate)function).addSpecialization( (IType[]) map_types[1], spec ); >+ if (function instanceof ICPPInternalTemplate) >+ ((ICPPInternalTemplate)function).addSpecialization( (IType[]) map_types[1], spec ); > return spec; > } > //TODO problem? >@@ -1275,14 +1279,14 @@ > //Using the transformed parameter list, perform argument deduction against the other > //function template > IType [] args = createArgsForFunctionTemplateOrdering( f1 ); >- ICPPFunction function = (ICPPFunction) ((ICPPInternalTemplate)f1).instantiate( args ); >+ ICPPFunction function = (ICPPFunction) ((ICPPInternalTemplateInstantiator)f1).instantiate( args ); > > ObjectMap m1 = null; > if( function != null ) > m1 = deduceTemplateArguments( f2, function.getType().getParameterTypes() ); > > args = createArgsForFunctionTemplateOrdering( f2 ); >- function = (ICPPFunction) ((ICPPInternalTemplate)f2).instantiate( args ); >+ function = (ICPPFunction) ((ICPPInternalTemplateInstantiator)f2).instantiate( args ); > > ObjectMap m2 = null; > if( function != null ) >Index: parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java,v >retrieving revision 1.14 >diff -u -r1.14 CPPClassInstance.java >--- parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java 23 Mar 2007 20:05:28 -0000 1.14 >+++ parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java 27 Mar 2007 20:01:36 -0000 >@@ -56,7 +56,7 @@ > ICPPBase [] bindings = cls.getBases(); > for (int i = 0; i < bindings.length; i++) { > IBinding base = bindings[i].getBaseClass(); >- if (base instanceof IType) { >+ if (bindings[i] instanceof CPPBaseClause && base instanceof IType) { > IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap); > ((CPPBaseClause)bindings[i]).setBaseClass((ICPPClassType)specBase); > } >Index: parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java,v >retrieving revision 1.64 >diff -u -r1.64 PDOMCPPLinkage.java >--- parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java 23 Mar 2007 20:05:28 -0000 1.64 >+++ parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java 27 Mar 2007 20:01:36 -0000 >@@ -573,6 +573,8 @@ > return new PDOMCPPNamespaceAlias(pdom, record); > case CPPBASICTYPE: > return new PDOMCPPBasicType(pdom, record); >+ case CPPPARAMETER: >+ return new PDOMCPPParameter(pdom, record); > case CPPENUMERATION: > return new PDOMCPPEnumeration(pdom, record); > case CPPENUMERATOR:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 179173
: 62149