-
Notifications
You must be signed in to change notification settings - Fork 468
[#5331] Do not emit mismatch
or overflow
warnings for explicit casts
#5334
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
base: main
Are you sure you want to change the base?
Conversation
00259cc
to
9e9ca07
Compare
The last test case that I added shows an example where this PR does not warn about an implicit cast when it should be (before this PR, it was warned about). I am not sure if it would be better to add this warning to |
afab515
to
842ff9c
Compare
I implemented this option for now. |
d6ea299
to
fd1d673
Compare
ir/expression.def
Outdated
@@ -516,6 +516,11 @@ class This : Expression { | |||
|
|||
class Cast : Operation_Unary { | |||
Type destType = type; | |||
bool implicit = false; |
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.
If you make this optional bool implicit = false;
, the two ctors will be autogenerated for you.
Also, the following comment is about destType
, so this should be after that, not between the declaration of destType
and the comment. Though given it is a ///
comment it should be before the declaration, not after it (or have a <
), so that Doxygen associates it with the member properly.
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.
Ok the placement of that comment did seem strange to me.. I will move it above the destType
declaration.
Signed-off-by: Kyle Cripps <[email protected]>
Signed-off-by: Kyle Cripps <[email protected]>
Signed-off-by: Kyle Cripps <[email protected]>
Signed-off-by: Kyle Cripps <[email protected]>
Signed-off-by: Kyle Cripps <[email protected]>
fd1d673
to
0010585
Compare
Addresses the issue of explicit casts being warned about, as discussed in #5331.