mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
Cosmetics.
This commit is contained in:
parent
60c479677f
commit
b908d4b133
1 changed files with 10 additions and 14 deletions
|
@ -197,7 +197,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* Name resolution
|
* Name resolution
|
||||||
*/
|
*/
|
||||||
public class CPPSemantics {
|
public class CPPSemantics {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum depth to search ancestors before assuming infinite looping.
|
* The maximum depth to search ancestors before assuming infinite looping.
|
||||||
*/
|
*/
|
||||||
|
@ -244,7 +243,6 @@ public class CPPSemantics {
|
||||||
}
|
}
|
||||||
if (data.problem != null)
|
if (data.problem != null)
|
||||||
return data.problem;
|
return data.problem;
|
||||||
|
|
||||||
|
|
||||||
// 3: resolve ambiguities
|
// 3: resolve ambiguities
|
||||||
IBinding binding;
|
IBinding binding;
|
||||||
|
@ -2700,17 +2698,15 @@ public class CPPSemantics {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static ICPPFunction findOverloadedOperator(IASTArraySubscriptExpression exp) {
|
public static ICPPFunction findOverloadedOperator(IASTArraySubscriptExpression exp) {
|
||||||
char[] name = OverloadableOperator.BRACKET.toCharArray();
|
char[] name = OverloadableOperator.BRACKET.toCharArray();
|
||||||
IASTExpression[] args = {exp.getArrayExpression(), exp.getSubscriptExpression()};
|
IASTExpression[] args = {exp.getArrayExpression(), exp.getSubscriptExpression()};
|
||||||
IType type1 = exp.getArrayExpression().getExpressionType();
|
IType type = exp.getArrayExpression().getExpressionType();
|
||||||
IType ultimateType1 = SemanticUtil.getUltimateTypeUptoPointers(type1);
|
type = SemanticUtil.getUltimateTypeUptoPointers(type);
|
||||||
return findOverloadedOperator(exp, args, ultimateType1, name, NonMemberMode.none);
|
return findOverloadedOperator(exp, args, type, name, NonMemberMode.none);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static ICPPFunction findOverloadedOperator(IASTFunctionCallExpression exp, ICPPClassType type) {
|
public static ICPPFunction findOverloadedOperator(IASTFunctionCallExpression exp, ICPPClassType type) {
|
||||||
char[] name = OverloadableOperator.PAREN.toCharArray();
|
char[] name = OverloadableOperator.PAREN.toCharArray();
|
||||||
IASTInitializerClause[] args = exp.getArguments();
|
IASTInitializerClause[] args = exp.getArguments();
|
||||||
|
@ -2756,10 +2752,10 @@ public class CPPSemantics {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ICPPClassType getNestedClassType(ICPPASTDeleteExpression exp) {
|
private static ICPPClassType getNestedClassType(ICPPASTDeleteExpression exp) {
|
||||||
IType type1 = exp.getOperand().getExpressionType();
|
IType type = exp.getOperand().getExpressionType();
|
||||||
IType ultimateType1 = SemanticUtil.getUltimateTypeUptoPointers(type1);
|
type = SemanticUtil.getUltimateTypeUptoPointers(type);
|
||||||
if (ultimateType1 instanceof IPointerType) {
|
if (type instanceof IPointerType) {
|
||||||
IType classType = ((IPointerType)ultimateType1).getType();
|
IType classType = ((IPointerType) type).getType();
|
||||||
if (classType instanceof ICPPClassType)
|
if (classType instanceof ICPPClassType)
|
||||||
return (ICPPClassType) classType;
|
return (ICPPClassType) classType;
|
||||||
}
|
}
|
||||||
|
@ -2774,7 +2770,7 @@ public class CPPSemantics {
|
||||||
IScope scope = null;
|
IScope scope = null;
|
||||||
try {
|
try {
|
||||||
scope = cls.getCompositeScope();
|
scope = cls.getCompositeScope();
|
||||||
} catch (DOMException e1) {
|
} catch (DOMException e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (scope == null)
|
if (scope == null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue