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

Recursive user-define operator->, bug 205964.

This commit is contained in:
Markus Schorn 2008-05-28 14:51:23 +00:00
parent 680007453f
commit ce474b8bc1

View file

@ -953,10 +953,10 @@ public class CPPVisitor {
IASTExpression owner = fieldReference.getFieldOwner();
IType type = getExpressionType(owner);
if (fieldReference.isPointerDereference()) {
type= getUltimateTypeUptoPointers(type);
// bug 205964: as long as the type is a class type, recurse.
// Be defensive and allow a max of 10 levels.
for (int j = 0; j < 10; j++) {
type= getUltimateTypeUptoPointers(type);
if (type instanceof ICPPClassType) {
ICPPFunction op = CPPSemantics.findOperator(fieldReference, (ICPPClassType) type);
if (op != null) {