-
Notifications
You must be signed in to change notification settings - Fork 284
Introduce typet::add_subtype #7110
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
Conversation
86b9a43 to
4aecae7
Compare
Codecov Report
@@ Coverage Diff @@
## develop #7110 +/- ##
========================================
Coverage 77.91% 77.92%
========================================
Files 1576 1576
Lines 181611 181645 +34
========================================
+ Hits 141511 141541 +30
- Misses 40100 40104 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This commit replaces uses of the nonconst typet::subtype() by casting the type to the applicable subtype, and then using the appropriate accessor method.
4aecae7 to
7a556aa
Compare
| public: | ||
| typet &add_subtype() |
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.
As discussed out of band: it would be nice to have a comment that explains when (not) to use this.
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
This introduces a new method typet::add_subtype(), identical in behavior to typet::subtype() nonconst, to allow current users of this method to add a subtype to a given type. The name of the method reflects that the subtype is added.
This commit replaces uses of typet::subtype() nonconst by typet::add_subtype(), which better reflects the action taken.
This protects typet::subtype() nonconst. There are no remaining uses of the method outside of the typet class hierarchy.
7a556aa to
8b7b7a9
Compare
Uh oh!
There was an error while loading. Please reload this page.