-
Notifications
You must be signed in to change notification settings - Fork 445
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
Fix for issue #133 #135
Fix for issue #133 #135
Conversation
namespace BMV2 { | ||
|
||
const IR::Node* DoCopyStructures::postorder(IR::AssignmentStatement* statement) { | ||
auto ltype = typeMap->getType(statement->left, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a preorder so that assignments of nested structs will get flattened properly too? However, that would likely require fixing the code to use and maintain the types in the expression nodes properly, rather than the typeMap, which will be out of date after the first flattening.
"size" | ||
}; | ||
for (size_t i=0; i < ELEMENTS(knownProperties); i++) | ||
if (property->name.name == knownProperties[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer for (auto propName : knownProperties)
for this kind of loop. Or even something like
static std::set<cstring> knownProperties = { ... };
if (!knownProperties.count(property->name))
warning(...
merged as 6bd98d1 -- rebase you branch on to master. |
No description provided.