mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
Cosmetics.
This commit is contained in:
parent
fa7aff1975
commit
4d2a57889c
6 changed files with 22 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2012, 2013 Google, Inc and others.
|
* Copyright (c) 2012, 2014 Google, Inc and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -112,7 +112,7 @@ public abstract class CPPEvaluation implements ICPPEvaluation {
|
||||||
return innerEval.isConstantExpression(point);
|
return innerEval.isConstantExpression(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isConstexprFuncOrNull(ICPPFunction function) {
|
protected static boolean isNullOrConstexprFunc(ICPPFunction function) {
|
||||||
return function == null || function.isConstexpr();
|
return function == null || function.isConstexpr();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -191,7 +191,7 @@ public class EvalBinary extends CPPDependentEvaluation {
|
||||||
public boolean isConstantExpression(IASTNode point) {
|
public boolean isConstantExpression(IASTNode point) {
|
||||||
return fArg1.isConstantExpression(point)
|
return fArg1.isConstantExpression(point)
|
||||||
&& fArg2.isConstantExpression(point)
|
&& fArg2.isConstantExpression(point)
|
||||||
&& isConstexprFuncOrNull(getOverload(point));
|
&& isNullOrConstexprFunc(getOverload(point));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class EvalComma extends CPPDependentEvaluation {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (ICPPFunction overload : fOverloads) {
|
for (ICPPFunction overload : fOverloads) {
|
||||||
if (!isConstexprFuncOrNull(overload)) {
|
if (!isNullOrConstexprFunc(overload)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,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)
|
||||||
&& isConstexprFuncOrNull(getOverload(point));
|
&& isNullOrConstexprFunc(getOverload(point));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPFunction getOverload(IASTNode point) {
|
public ICPPFunction getOverload(IASTNode point) {
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class EvalTypeId extends CPPDependentEvaluation {
|
||||||
public boolean isConstantExpression(IASTNode point) {
|
public boolean isConstantExpression(IASTNode point) {
|
||||||
return !fRepresentsNewExpression
|
return !fRepresentsNewExpression
|
||||||
&& areAllConstantExpressions(fArguments, point)
|
&& areAllConstantExpressions(fArguments, point)
|
||||||
&& isConstexprFuncOrNull(getConstructor(point));
|
&& isNullOrConstexprFunc(getConstructor(point));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -239,8 +239,8 @@ public class EvalTypeId extends CPPDependentEvaluation {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ICPPEvaluation computeForFunctionCall(CPPFunctionParameterMap parameterMap,
|
public ICPPEvaluation computeForFunctionCall(CPPFunctionParameterMap parameterMap, int maxdepth,
|
||||||
int maxdepth, IASTNode point) {
|
IASTNode point) {
|
||||||
ICPPEvaluation[] args = fArguments;
|
ICPPEvaluation[] args = fArguments;
|
||||||
for (int i = 0; i < fArguments.length; i++) {
|
for (int i = 0; i < fArguments.length; i++) {
|
||||||
ICPPEvaluation arg = fArguments[i].computeForFunctionCall(parameterMap, maxdepth, point);
|
ICPPEvaluation arg = fArguments[i].computeForFunctionCall(parameterMap, maxdepth, point);
|
||||||
|
|
|
@ -148,7 +148,7 @@ public class EvalUnary extends CPPDependentEvaluation {
|
||||||
@Override
|
@Override
|
||||||
public boolean isConstantExpression(IASTNode point) {
|
public boolean isConstantExpression(IASTNode point) {
|
||||||
return fArgument.isConstantExpression(point)
|
return fArgument.isConstantExpression(point)
|
||||||
&& isConstexprFuncOrNull(getOverload(point));
|
&& isNullOrConstexprFunc(getOverload(point));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPFunction getOverload(IASTNode point) {
|
public ICPPFunction getOverload(IASTNode point) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue