1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 01:05:38 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-03-25 15:35:37 -07:00
parent fa7aff1975
commit 4d2a57889c
6 changed files with 22 additions and 22 deletions

View file

@ -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();
} }
} }

View file

@ -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

View file

@ -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;
} }
} }

View file

@ -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) {

View file

@ -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);

View file

@ -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) {