mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Cosmetics.
This commit is contained in:
parent
9ea3641953
commit
7f6e86085c
4 changed files with 9 additions and 10 deletions
|
@ -32,8 +32,7 @@ public final class InstantiationContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameterMap mapping of template parameters to arguments, may be {@code null}.
|
* @param parameterMap mapping of template parameters to arguments, may be {@code null}.
|
||||||
* @param packOffset parameter pack offset, or -1 if expansion of a parameter pack is not desired
|
* @param packOffset parameter pack offset, or -1 if expansion of a parameter pack is not desired pack.
|
||||||
* pack.
|
|
||||||
* @param contextTypeSpecialization the type specialization if instantiation happens inside a specialized
|
* @param contextTypeSpecialization the type specialization if instantiation happens inside a specialized
|
||||||
* type, otherwise {@code null}.
|
* type, otherwise {@code null}.
|
||||||
* @param point the point of instantiation
|
* @param point the point of instantiation
|
||||||
|
@ -132,7 +131,7 @@ public final class InstantiationContext {
|
||||||
/**
|
/**
|
||||||
* Returns the point of instantiation
|
* Returns the point of instantiation
|
||||||
*/
|
*/
|
||||||
public IASTNode getPoint() {
|
public final IASTNode getPoint() {
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,7 @@ public class EvalFunctionCall extends CPPDependentEvaluation {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isConstantExpression(IASTNode point) {
|
public boolean isConstantExpression(IASTNode point) {
|
||||||
return areAllConstantExpressions(fArguments, point)
|
return areAllConstantExpressions(fArguments, point) && isNullOrConstexprFunc(getOverload(point));
|
||||||
&& isNullOrConstexprFunc(getOverload(point));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPFunction getOverload(IASTNode point) {
|
public ICPPFunction getOverload(IASTNode point) {
|
||||||
|
@ -184,7 +183,8 @@ public class EvalFunctionCall extends CPPDependentEvaluation {
|
||||||
|
|
||||||
if (args[0] instanceof EvalFunctionSet && getOverload(context.getPoint()) == null) {
|
if (args[0] instanceof EvalFunctionSet && getOverload(context.getPoint()) == null) {
|
||||||
// Resolve the function using the parameters of the function call.
|
// Resolve the function using the parameters of the function call.
|
||||||
args[0] = ((EvalFunctionSet) args[0]).resolveFunction(Arrays.copyOfRange(args, 1, args.length), context.getPoint());
|
EvalFunctionSet functionSet = (EvalFunctionSet) args[0];
|
||||||
|
args[0] = functionSet.resolveFunction(Arrays.copyOfRange(args, 1, args.length), context.getPoint());
|
||||||
}
|
}
|
||||||
return new EvalFunctionCall(args, getTemplateDefinition());
|
return new EvalFunctionCall(args, getTemplateDefinition());
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,8 +165,8 @@ public class EvalMemberAccess extends CPPDependentEvaluation {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IType getFieldOwnerType(IType fieldOwnerExpressionType, boolean isDeref, IASTNode point, Collection<ICPPFunction> functionBindings,
|
public static IType getFieldOwnerType(IType fieldOwnerExpressionType, boolean isDeref, IASTNode point,
|
||||||
boolean returnDependent) {
|
Collection<ICPPFunction> functionBindings, boolean returnDependent) {
|
||||||
IType type= fieldOwnerExpressionType;
|
IType type= fieldOwnerExpressionType;
|
||||||
if (!isDeref)
|
if (!isDeref)
|
||||||
return type;
|
return type;
|
||||||
|
|
Loading…
Add table
Reference in a new issue