mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Code streamlining.
Change-Id: Ifcf5a23c1a8948d43adc4f0761a83695bb34d3e8
This commit is contained in:
parent
4d6c9dce1a
commit
13472faa4d
1 changed files with 19 additions and 14 deletions
|
@ -422,21 +422,26 @@ public class EvalID extends CPPDependentEvaluation {
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
}
|
}
|
||||||
IBinding[] bindings = data.getFoundBindings();
|
IBinding[] bindings = data.getFoundBindings();
|
||||||
if (bindings.length >= 1 && bindings[0] instanceof ICPPFunction) {
|
if (bindings.length != 0) {
|
||||||
|
IBinding binding = bindings[0];
|
||||||
|
if (binding instanceof ICPPFunction) {
|
||||||
ICPPFunction[] functions = new ICPPFunction[bindings.length];
|
ICPPFunction[] functions = new ICPPFunction[bindings.length];
|
||||||
System.arraycopy(bindings, 0, functions, 0, bindings.length);
|
System.arraycopy(bindings, 0, functions, 0, bindings.length);
|
||||||
return new EvalFunctionSet(new CPPFunctionSet(functions, templateArgs, null), fQualified, fAddressOf,
|
return new EvalFunctionSet(new CPPFunctionSet(functions, templateArgs, null), fQualified,
|
||||||
|
fAddressOf, impliedObjectType, getTemplateDefinition());
|
||||||
|
}
|
||||||
|
if (binding instanceof CPPFunctionSet) {
|
||||||
|
return new EvalFunctionSet((CPPFunctionSet) binding, fQualified, fAddressOf,
|
||||||
impliedObjectType, getTemplateDefinition());
|
impliedObjectType, getTemplateDefinition());
|
||||||
}
|
}
|
||||||
IBinding binding = bindings.length == 1 ? bindings[0] : null;
|
|
||||||
if (binding instanceof IEnumerator) {
|
if (binding instanceof IEnumerator) {
|
||||||
return new EvalBinding(binding, null, getTemplateDefinition());
|
return new EvalBinding(binding, null, getTemplateDefinition());
|
||||||
} else if (binding instanceof ICPPMember) {
|
}
|
||||||
return new EvalMemberAccess(nameOwner, ValueCategory.PRVALUE, binding, false, getTemplateDefinition());
|
if (binding instanceof ICPPMember) {
|
||||||
} else if (binding instanceof CPPFunctionSet) {
|
return new EvalMemberAccess(nameOwner, ValueCategory.PRVALUE, binding, false,
|
||||||
return new EvalFunctionSet((CPPFunctionSet) binding, fQualified, fAddressOf, impliedObjectType,
|
|
||||||
getTemplateDefinition());
|
getTemplateDefinition());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue