1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-07-10 18:08:11 -07:00
parent a3307396d4
commit 147a6373cf
17 changed files with 67 additions and 63 deletions

View file

@ -17,7 +17,6 @@ import org.eclipse.cdt.core.dom.ast.IASTNameOwner;
* Provides additional methods for internal use by the name resolution.
*/
public interface IASTInternalNameOwner extends IASTNameOwner {
/**
* Get the role for the name. If the name needs to be resolved to determine that and
* <code>allowResolution</code> is set to <code>false</code>, then {@link IASTNameOwner#r_unclear}

View file

@ -17,7 +17,6 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
* Internal interface for bindings in the ast that have values.
*/
public interface IInternalVariable extends IVariable {
/**
* Returns the value of the variable, or <code>null</code>.
* If the recursion depth is reached {@link Value#UNKNOWN} will be returned.

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.dom.parser;
import org.eclipse.core.runtime.CoreException;
/**
* Interface for marshalling types for storage in the index.
*/

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.dom.parser;
import org.eclipse.core.runtime.CoreException;
/**
* Interface for marshalling types for storage in the index.
*/

View file

@ -18,12 +18,12 @@ import org.eclipse.cdt.core.dom.ast.IType;
*/
public interface ITypeContainer extends IType {
/**
* get the type this contains
* Returns the type this container contains.
*/
IType getType();
/**
* set the type this contains
* Sets the type this container contains.
*/
void setType(IType type);
}

View file

@ -8,14 +8,12 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser;
import org.eclipse.cdt.core.parser.AbstractParserLogService;
import org.eclipse.cdt.core.parser.IParserLogService;
public class ParserLogServiceWrapper extends AbstractParserLogService {
private IParserLogService fDelegate;
public ParserLogServiceWrapper(IParserLogService log) {

View file

@ -16,7 +16,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType;
import org.eclipse.core.runtime.CoreException;
/**
* Implementation of problem types.
*/

View file

@ -94,7 +94,7 @@ public class Value implements IValue {
fMap= map;
}
public void nextSeperator() throws UnknownValueException {
public void nextSeparator() throws UnknownValueException {
final char[] expression = fExpression;
final int len = expression.length;
int idx = pos;
@ -783,17 +783,17 @@ public class Value implements IValue {
switch (c) {
case BINARY_OP_CHAR:
int op= parseNonNegative(buf, idx + 1);
reeval.nextSeperator();
reeval.nextSeparator();
Object o1= reevaluate(reeval, maxdepth);
Object o2= reevaluate(reeval, maxdepth);
return combineBinary(op, o1, o2);
case UNARY_OP_CHAR:
op= parseNonNegative(buf, idx + 1);
reeval.nextSeperator();
reeval.nextSeparator();
o1= reevaluate(reeval, maxdepth);
return combineUnary(op, o1);
case CONDITIONAL_CHAR:
reeval.nextSeperator();
reeval.nextSeparator();
Object cond= reevaluate(reeval, maxdepth);
Object po= reevaluate(reeval, maxdepth);
Object neg= reevaluate(reeval, maxdepth);
@ -811,12 +811,12 @@ public class Value implements IValue {
final IBinding[] resolvedUnknowns= reeval.fResolvedUnknown;
if (num >= resolvedUnknowns.length)
throw UNKNOWN_EX;
reeval.nextSeperator();
reeval.nextSeparator();
return evaluateBinding(resolvedUnknowns[num], reeval.fUnknownSigs, reeval.fUnknowns, maxdepth);
case TEMPLATE_PARAM_CHAR:
num= parseHex(buf, idx + 1);
reeval.nextSeperator();
reeval.nextSeparator();
ICPPTemplateArgument arg = reeval.fMap.getArgument(num);
if (arg != null) {
IValue val= arg.getNonTypeValue();
@ -828,7 +828,7 @@ public class Value implements IValue {
case TEMPLATE_PARAM_PACK_CHAR:
num= parseHex(buf, idx + 1);
reeval.nextSeperator();
reeval.nextSeparator();
arg= null;
if (reeval.fPackOffset >= 0) {
ICPPTemplateArgument[] args= reeval.fMap.getPackExpansion(num);
@ -845,7 +845,7 @@ public class Value implements IValue {
return createTemplateParamExpression(num, true);
default:
reeval.nextSeperator();
reeval.nextSeparator();
return parseLong(buf, idx);
}
}

View file

@ -12,7 +12,10 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.TypeSelection.PARAMETERS;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.TypeSelection.RETURN_TYPE;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.*;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.CVTYPE;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory;

View file

@ -1,10 +1,13 @@
/*
* FunctionSetType.java
* Created on Sep 14, 2010
/*******************************************************************************
* Copyright (c) 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Copyright 2010 Wind River Systems, Inc. All rights reserved.
*/
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
@ -22,7 +25,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.Cost.Rank;
* Used during overload resolution as a place-holder for function sets.
*/
public class FunctionSetType implements IType {
private final CPPFunctionSet fFunctionSet;
private final boolean fPointerType;

View file

@ -33,7 +33,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPASTInternalScope;
* Utility class to populate scope with friend declarations hidden in nested classes
*/
class NamespaceTypeCollector extends ASTVisitor {
private final ICPPASTInternalScope fScope;
public NamespaceTypeCollector(ICPPASTInternalScope scope) {

View file

@ -11,7 +11,13 @@
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.*;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.ALLCVQ;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.CVTYPE;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getCVQualifier;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getSimplifiedType;
import java.util.ArrayList;
import java.util.Arrays;
@ -69,9 +75,8 @@ public class TemplateArgumentDeduction {
* @param point
*/
static ICPPTemplateArgument[] deduceForFunctionCall(ICPPFunctionTemplate template,
ICPPTemplateArgument[] tmplArgs, List<IType> fnArgs, List<ValueCategory> argIsLValue, CPPTemplateParameterMap map, IASTNode point)
throws DOMException {
ICPPTemplateArgument[] tmplArgs, List<IType> fnArgs, List<ValueCategory> argIsLValue,
CPPTemplateParameterMap map, IASTNode point) throws DOMException {
final ICPPTemplateParameter[] tmplParams = template.getTemplateParameters();
if (tmplArgs != null && !addExplicitArguments(tmplParams, tmplArgs, map, point))
@ -87,13 +92,14 @@ public class TemplateArgumentDeduction {
* Deduces the mapping for the template parameters from the function parameters,
* returns <code>false</code> if there is no mapping.
*/
static boolean deduceFromFunctionArgs(ICPPFunctionTemplate template, List<IType> fnArgs, List<ValueCategory> argCats,
CPPTemplateParameterMap map, IASTNode point) {
static boolean deduceFromFunctionArgs(ICPPFunctionTemplate template, List<IType> fnArgs,
List<ValueCategory> argCats, CPPTemplateParameterMap map, IASTNode point) {
try {
IType[] fnPars = template.getType().getParameterTypes();
final int fnParCount = fnPars.length;
final ICPPTemplateParameter[] tmplPars = template.getTemplateParameters();
TemplateArgumentDeduction deduct= new TemplateArgumentDeduction(tmplPars, map, new CPPTemplateParameterMap(fnParCount), 0);
TemplateArgumentDeduction deduct=
new TemplateArgumentDeduction(tmplPars, map, new CPPTemplateParameterMap(fnParCount), 0);
IType fnParPack= null;
argLoop: for (int j= 0; j < fnArgs.size(); j++) {
IType par;
@ -474,7 +480,6 @@ public class TemplateArgumentDeduction {
return result.toArray(new ICPPTemplateArgument[result.size()]);
}
/**
* 14.8.2.1.3 If P is a class and has the form template-id, then A can be a derived class of the deduced A.
*/
@ -543,7 +548,9 @@ public class TemplateArgumentDeduction {
* Deduces the template parameter mapping from pairs of template arguments.
* @param point
*/
public static boolean fromTemplateArguments(final ICPPTemplateParameter[] pars, final ICPPTemplateArgument[] p, final ICPPTemplateArgument[] a, CPPTemplateParameterMap map, IASTNode point) throws DOMException {
public static boolean fromTemplateArguments(final ICPPTemplateParameter[] pars,
final ICPPTemplateArgument[] p, final ICPPTemplateArgument[] a, CPPTemplateParameterMap map,
IASTNode point) throws DOMException {
TemplateArgumentDeduction deduct= new TemplateArgumentDeduction(pars, null, map, 0);
final int len= a.length;
if (p == null || p.length != len) {
@ -663,7 +670,6 @@ public class TemplateArgumentDeduction {
return fromType(p.getTypeValue(), a.getTypeValue(), false, point);
}
private boolean fromType(IType p, IType a, boolean allowCVQConversion, IASTNode point) throws DOMException {
while (p != null) {
while (a instanceof ITypedef)

View file

@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
import org.eclipse.cdt.core.dom.ast.IType;

View file

@ -1,10 +1,13 @@
/*
* UniqueType.java
* Created on 04.10.2010
/*******************************************************************************
* Copyright (c) 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Copyright 2010 Wind River Systems, Inc. All rights reserved.
*/
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
import org.eclipse.cdt.core.dom.ast.IType;
@ -13,7 +16,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
* Used for computing the partial ordering of function templates.
*/
class UniqueType implements IType {
private boolean fForParameterPack;
public UniqueType(boolean forParameterPack) {