forked from qt-creator/qt-creator
Check the member access operator before trying to resolve the base expression.
This commit is contained in:
@@ -609,10 +609,10 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
|
|||||||
return retBinding;
|
return retBinding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (accessOp == T_DOT) {
|
||||||
|
if (replacedDotOperator) {
|
||||||
if (replacedDotOperator && accessOp == T_DOT) {
|
|
||||||
if (PointerType *ptrTy = ty->asPointerType()) {
|
if (PointerType *ptrTy = ty->asPointerType()) {
|
||||||
|
// replace . with ->
|
||||||
ty = ptrTy->elementType();
|
ty = ptrTy->elementType();
|
||||||
*replacedDotOperator = true;
|
*replacedDotOperator = true;
|
||||||
}
|
}
|
||||||
@@ -621,6 +621,7 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
|
|||||||
if (ClassOrNamespace *binding = findClass(ty, scope))
|
if (ClassOrNamespace *binding = findClass(ty, scope))
|
||||||
return binding;
|
return binding;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user