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-06-04 15:11:32 -07:00
parent 4e872b05cb
commit 34d5ba7154

View file

@ -87,11 +87,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
CPPASTFunctionCallExpression copy = new CPPASTFunctionCallExpression(null, args); CPPASTFunctionCallExpression copy = new CPPASTFunctionCallExpression(null, args);
copy.setFunctionNameExpression(functionName == null ? null : functionName.copy(style)); copy.setFunctionNameExpression(functionName == null ? null : functionName.copy(style));
copy.setOffsetAndLength(this); return copy(copy, style);
if (style == CopyStyle.withLocations) {
copy.setCopyLocation(this);
}
return copy;
} }
@Override @Override
@ -240,7 +236,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
overload= null; overload= null;
IType t= isExplicitTypeConversion(); IType t= isExplicitTypeConversion();
if (t != null) { if (t != null) {
t = getNestedType(t, TDEF|CVTYPE|REF); t = getNestedType(t, TDEF | CVTYPE | REF);
if (t instanceof ICPPClassType && !(t instanceof ICPPUnknownBinding)) { if (t instanceof ICPPClassType && !(t instanceof ICPPUnknownBinding)) {
ICPPClassType cls= (ICPPClassType) t; ICPPClassType cls= (ICPPClassType) t;
LookupData data= CPPSemantics.createLookupData(((IASTIdExpression) functionName).getName()); LookupData data= CPPSemantics.createLookupData(((IASTIdExpression) functionName).getName());
@ -252,9 +248,9 @@ public class CPPASTFunctionCallExpression extends ASTNode
} }
} }
} else { } else {
t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF|REF|CVTYPE); t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF | REF | CVTYPE);
if (t instanceof ICPPClassType) { if (t instanceof ICPPClassType) {
overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t);
} }
} }
} }
@ -272,10 +268,10 @@ public class CPPASTFunctionCallExpression extends ASTNode
return prvalueType(t); return prvalueType(t);
} }
t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF|REF|CVTYPE); t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF | REF | CVTYPE);
if (t instanceof ICPPClassType) { if (t instanceof ICPPClassType) {
if (overload == UNINITIALIZED_FUNCTION) { if (overload == UNINITIALIZED_FUNCTION) {
overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t);
} }
if (overload != null) { if (overload != null) {
return typeFromFunctionCall(overload); return typeFromFunctionCall(overload);
@ -294,7 +290,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION); return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
} }
private IType isExplicitTypeConversion() { private IType isExplicitTypeConversion() {
if (functionName instanceof IASTIdExpression) { if (functionName instanceof IASTIdExpression) {
final IASTName name = ((IASTIdExpression) functionName).getName(); final IASTName name = ((IASTIdExpression) functionName).getName();
@ -318,7 +314,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
IType t= functionName.getExpressionType(); IType t= functionName.getExpressionType();
if (t instanceof ICPPClassType) { if (t instanceof ICPPClassType) {
if (overload == UNINITIALIZED_FUNCTION) { if (overload == UNINITIALIZED_FUNCTION) {
overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t);
} }
if (overload != null) { if (overload != null) {
return valueCategoryFromFunctionCall(overload); return valueCategoryFromFunctionCall(overload);