diff --git a/expr.h b/expr.h index c66b7754..48388475 100644 --- a/expr.h +++ b/expr.h @@ -314,7 +314,6 @@ public: std::string identifier; const SourcePos identifierPos; -protected: MemberExpr(Expr *expr, const char *identifier, SourcePos pos, SourcePos identifierPos, bool derefLValue); diff --git a/stmt.cpp b/stmt.cpp index 783d0a5d..5f23c98f 100644 --- a/stmt.cpp +++ b/stmt.cpp @@ -695,6 +695,23 @@ lCheckAllOffSafety(ASTNode *node, void *data) { } // All indices are in-bounds + return true; + } + + MemberExpr *me; + if ((me = dynamic_cast(node)) != NULL && + me->dereferenceExpr) { + *okPtr = false; + return false; + } + + DereferenceExpr *de; + if ((de = dynamic_cast(node)) != NULL) { + const Type *exprType = de->expr->GetType(); + if (dynamic_cast(exprType) != NULL) { + *okPtr = false; + return false; + } } return true;