-
Notifications
You must be signed in to change notification settings - Fork 123
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 tape push expr for clad array in reverse mode #640
Conversation
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.
clang-tidy made some suggestions
@@ -95,7 +95,12 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, | |||
Expr* exprToPush = E; | |||
if (auto AT = dyn_cast<ArrayType>(E->getType())) { | |||
Expr* init = getArraySizeExpr(AT, m_Context, *this); | |||
exprToPush = BuildOp(BO_Comma, E, init); | |||
Expr* pushArgs[] = {E, init}; |
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.
warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays]
Expr* pushArgs[] = {E, init};
^
clang-tidy review says "All clean, LGTM! 👍" |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #640 +/- ##
=======================================
Coverage 94.05% 94.05%
=======================================
Files 43 43
Lines 6237 6241 +4
=======================================
+ Hits 5866 5870 +4
Misses 371 371
|
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.
LGTM!
Using comma expressions for pushing a clad array onto a tape generated a warning and also resulted in invalid results in some cases.
Fixes #635