Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes from static analysis #4391

Merged
merged 12 commits into from
Feb 6, 2024
Prev Previous commit
Next Next commit
Fix "changes" flag initialization
  • Loading branch information
vlstill committed Feb 6, 2024
commit 8750b9ba3bbb653d2012f27d5ff5be2aec3ea619
2 changes: 1 addition & 1 deletion midend/removeComplexExpressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const IR::Vector<IR::Expression> *RemoveComplexExpressions::simplifyExpressions(
// of the list. Otherwise we simplify the argument itself.
// This is mostly for functions that take FieldLists - these
// should still take a list as argument.
bool changes = true;
bool changes = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the for cycle below.

auto result = new IR::Vector<IR::Expression>();
for (auto e : *vec) {
auto r = simplifyExpression(e, force);
Expand Down