Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
index 50b8f046ce1..f9c4632182d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
@@ -281,7 +281,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
ICPPFunction parameterOwner = e.getParameterOwner();
if (parameterOwner != null) {
IType b = e.getFixedType();
- IBinding a2 = getCompositeBinding((IIndexFragmentBinding) parameterOwner);
+ IBinding a2 = parameterOwner;
+ if (parameterOwner instanceof IIndexFragmentBinding) {
+ a2 = getCompositeBinding((IIndexFragmentBinding) parameterOwner);
+ }
IType b2 = getCompositeType(b);
if (parameterOwner != a2 || b != b2 || templateDefinition != compositeTemplateDefinition) {
int parameterPosition = e.getFunctionParameterPosition();
@@ -291,7 +294,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
IBinding a = e.getBinding();
IType b = e.getFixedType();
- IBinding a2 = getCompositeBinding((IIndexFragmentBinding) a);
+ IBinding a2 = a;
+ if (a instanceof IIndexFragmentBinding) {
+ a2 = getCompositeBinding((IIndexFragmentBinding) a);
+ }
IType b2 = getCompositeType(b);
if (a != a2 || b != b2 || templateDefinition != compositeTemplateDefinition)
e= new EvalBinding(a2, b2, compositeTemplateDefinition);
@@ -395,7 +401,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
IType a = e.getOwnerType();
IBinding b = e.getMember();
IType a2= getCompositeType(a);
- IBinding b2= getCompositeBinding((IIndexFragmentBinding) b);
+ IBinding b2= b;
+ if (b instanceof IIndexFragmentBinding) {
+ b2= getCompositeBinding((IIndexFragmentBinding) b);
+ }
if (a != a2 || b != b2 || templateDefinition != compositeTemplateDefinition)
e= new EvalMemberAccess(a2, e.getOwnerValueCategory(), b2, e.isPointerDeref(), compositeTemplateDefinition);
return e;
@@ -423,7 +432,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
ICPPEvaluation a = e.getArgument();
ICPPEvaluation a2 = getCompositeEvaluation(a);
IBinding b= e.getAddressOfQualifiedNameBinding();
- IBinding b2= getCompositeBinding((IIndexFragmentBinding) b);
+ IBinding b2= b;
+ if (b instanceof IIndexFragmentBinding) {
+ b2= getCompositeBinding((IIndexFragmentBinding) b);
+ }
if (a != a2 || b != b2 || templateDefinition != compositeTemplateDefinition)
e= new EvalUnary(e.getOperator(), a2, b2, compositeTemplateDefinition);
return e;

Back to the top