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:
parent
680007453f
commit
ce474b8bc1
1 changed files with 1 additions and 1 deletions
|
@ -953,10 +953,10 @@ public class CPPVisitor {
|
||||||
IASTExpression owner = fieldReference.getFieldOwner();
|
IASTExpression owner = fieldReference.getFieldOwner();
|
||||||
IType type = getExpressionType(owner);
|
IType type = getExpressionType(owner);
|
||||||
if (fieldReference.isPointerDereference()) {
|
if (fieldReference.isPointerDereference()) {
|
||||||
type= getUltimateTypeUptoPointers(type);
|
|
||||||
// bug 205964: as long as the type is a class type, recurse.
|
// bug 205964: as long as the type is a class type, recurse.
|
||||||
// Be defensive and allow a max of 10 levels.
|
// Be defensive and allow a max of 10 levels.
|
||||||
for (int j = 0; j < 10; j++) {
|
for (int j = 0; j < 10; j++) {
|
||||||
|
type= getUltimateTypeUptoPointers(type);
|
||||||
if (type instanceof ICPPClassType) {
|
if (type instanceof ICPPClassType) {
|
||||||
ICPPFunction op = CPPSemantics.findOperator(fieldReference, (ICPPClassType) type);
|
ICPPFunction op = CPPSemantics.findOperator(fieldReference, (ICPPClassType) type);
|
||||||
if (op != null) {
|
if (op != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue