-
Notifications
You must be signed in to change notification settings - Fork 5
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
[GAIAPLAT-1245] Incrementing with tagged property produces a compile error #955
Conversation
@@ -1382,8 +1381,7 @@ SourceRange get_expression_source_range(ASTContext* context, const Stmt& node, c | |||
else if (const auto* expression = node_parents_iterator.get<GaiaForStmt>()) | |||
{ | |||
SourceRange for_condition_source_range = SourceRange(expression->getLParenLoc().getLocWithOffset(1), expression->getRParenLoc().getLocWithOffset(-1)); | |||
if (is_range_contained_in_another_range(for_condition_source_range, return_value) || | |||
is_range_contained_in_another_range(return_value, for_condition_source_range)) | |||
if (is_range_contained_in_another_range(for_condition_source_range, return_value) || is_range_contained_in_another_range(return_value, for_condition_source_range)) |
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.
This is already fixed in another PR.
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.
Yes, I thought this looked familiar.
@@ -631,6 +631,12 @@ ruleset test_insert_delete_2 | |||
{ | |||
grade = c_grade_d + c_grade_plus; | |||
} | |||
|
|||
on_update(s:student) | |||
{ |
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.
and maybe just an unqualified total_hours++
as well to round out the test case.
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.
Done.
anyOf( | ||
hasOperatorName("++"), | ||
hasOperatorName("--")), | ||
hasUnaryOperand( |
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.
I guess this is AST101 for me. Why was the above matcher not sufficient? I.e., how did you know it needed to be this to fix the issue with the Tag. I'm trying to understand why T.field++
was not recognized as something Gaia had to act on but table.field++
or field++
worked just fine.
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.
Well actually it was not matching table.field++
either. Once I realized that it was trivial to understand that the matcher needs to be the same as the fieldSet
(line above).
As of why it did't match, I guess the reason is that memberExpr(member(hasAttr(attr::GaiaFieldLValue
looks for the attr::GaiaFieldLValue
on the member side field
instead of the other table side table
.
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.
Approved but I don't understand why the fix makes sense because I don't understand LLVM's ASTs well-enough. Your tests tell me it's working though. Thanks for adding them.
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, but I don't understand this code enough, to be able to evaluate the functional change.
…into rondelli-gaiat-plusplus
No description provided.