}
}
}
+if(!notByReference && exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 5 && (!exp->destType || (exp->destType->kind != 3 && exp->destType->kind != 4 && exp->destType->kind != 22 && exp->destType->kind != 23 && exp->destType->kind != 5 && exp->destType->kind != 2 && exp->destType->kind != 1 && exp->destType->kind != 24)))
+{
+exp->byReference = 1;
+}
yylloc = exp->loc;
if(exp->destType && (exp->destType->kind == 18))
;
}
}
+ // Trying to do this here before conversion properties kick in and this becomes a new expression... (Fixing Class c; const char * a = c;)
+ // Mark nohead classes as by reference, unless we're casting them to an integral type
+ if(!notByReference && exp.expType && exp.expType.kind == classType && exp.expType._class && exp.expType._class.registered &&
+ exp.expType._class.registered.type == noHeadClass && (!exp.destType ||
+ (exp.destType.kind != intType && exp.destType.kind != int64Type && exp.destType.kind != intPtrType && exp.destType.kind != intSizeType &&
+ exp.destType.kind != longType && exp.destType.kind != shortType && exp.destType.kind != charType && exp.destType.kind != _BoolType)))
+ {
+ exp.byReference = true;
+ }
+
yylloc = exp.loc;
if(exp.destType && (/*exp.destType.kind == voidType || */exp.destType.kind == dummyType) );
else if(exp.destType && !exp.destType.keepCast)