Skip to content

Commit 4f26407

Browse files
authored
Allow method calls in index expressions in hsIndexSimplify (#4240)
1 parent 04eeea8 commit 4f26407

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

midend/hsIndexSimplify.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ void HSIndexFinder::addNewVariable() {
2020
if (locals != nullptr && (arrayIndex->right->is<IR::Operation_Ternary>() ||
2121
arrayIndex->right->is<IR::Operation_Binary>() ||
2222
arrayIndex->right->is<IR::Operation_Unary>() ||
23+
arrayIndex->right->is<IR::MethodCallExpression>() ||
2324
arrayIndex->right->is<IR::PathExpression>())) {
2425
// Generate new local variable if needed.
2526
std::ostringstream ostr;

0 commit comments

Comments
 (0)