-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: support referencing local variables in pointer initialization #1346
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1346 +/- ##
==========================================
+ Coverage 91.11% 91.41% +0.29%
==========================================
Files 153 160 +7
Lines 44816 49660 +4844
==========================================
+ Hits 40833 45395 +4562
- Misses 3983 4265 +282 ☔ View full report in Codecov by Sentry. |
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.
Looks good, just missing a new error code
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.
Nice!
Adds support to initialize pointer, alias and reference-to variables with the address of local POU members.
The only exception is that stateful members cannot be initialized with addresses of temporary values, since 1) they do not exist at the time of initialization and 2) would lead to dangling pointers after going out of scope.