1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2009-04-12 05:48:15 +00:00
parent 3550a299d4
commit 824d47c599
3 changed files with 21 additions and 31 deletions

View file

@ -156,12 +156,10 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
}
public IASTNode[] getDeclarations() {
return declarations;
}
public IASTNode getDefinition() {
return definition;
}
@ -229,7 +227,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return result;
}
public IScope getFunctionScope() {
resolveAllDeclarations();
if (definition != null) {
@ -239,12 +236,10 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return declarations[0].getFunctionScope();
}
public String getName() {
return getASTName().toString();
}
public char[] getNameCharArray() {
return getASTName().getSimpleID();
}
@ -286,7 +281,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return scope;
}
public ICPPFunctionType getType() {
if (type == null)
type = (ICPPFunctionType) CPPVisitor.createType((definition != null) ? definition : declarations[0]);
@ -358,7 +352,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
}
public boolean isStatic() {
return isStatic(true);
}
@ -401,17 +394,14 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
// return false;
// }
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName(this);
}
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray(this);
}
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while (scope != null) {

View file

@ -52,6 +52,7 @@ import org.eclipse.core.runtime.CoreException;
*/
public class Conversions {
enum UDCMode {allowUDC, noUDC, deferUDC}
/**
* Computes the cost of an implicit conversion sequence
* [over.best.ics] 13.3.3.1
@ -338,10 +339,10 @@ public class Conversions {
return c;
}
//constructors
// Constructors
if (t instanceof ICPPClassType) {
ICPPConstructor[] ctors= ((ICPPClassType) t).getConstructors();
// select converting constructors
// Select converting constructors
int j= 0;
ICPPConstructor[] convertingCtors= new ICPPConstructor[ctors.length];
for (int i = 0; i < ctors.length; i++) {
@ -364,7 +365,7 @@ public class Conversions {
}
}
//conversion operators
// Conversion operators
boolean ambiguousConversionOperator= false;
if (s instanceof ICPPClassType) {
ICPPMethod[] ops = SemanticUtil.getConversionOperators((ICPPClassType) s);
@ -456,7 +457,6 @@ public class Conversions {
IType target = getNestedType(cost.target, REF | TDEF);
IType source= getNestedType(cost.source, TDEF);
// 4.1 lvalue to rvalue
IType srcRValue= getNestedType(source, REF | TDEF);
if (source instanceof ICPPReferenceType) {
@ -524,7 +524,7 @@ public class Conversions {
}
}
// this should actually be done in 'checkImplicitConversionSequence', see 13.3.3.1-6 and 8.5.14
// This should actually be done in 'checkImplicitConversionSequence', see 13.3.3.1-6 and 8.5.14
// 8.5.14 cv-qualifiers can be ignored for non-class types
IType unqualifiedTarget= getNestedType(target, CVQ | PTR_CVQ | TDEF | REF);
if (!(unqualifiedTarget instanceof ICPPClassType)) {
@ -788,8 +788,8 @@ public class Conversions {
if (type instanceof IIndexFragmentBinding) {
try {
return ((IIndexFragmentBinding) type).hasDefinition();
} catch(CoreException ce) {
CCorePlugin.log(ce);
} catch (CoreException e) {
CCorePlugin.log(e);
}
}
try {