-
Notifications
You must be signed in to change notification settings - Fork 273
introduce protected_exprt #3855
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
Changes from all commits
1280010
6c14669
39d38f1
adb0533
a48f855
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -319,6 +319,28 @@ class exprt:public irept | |
const_unique_depth_iteratort unique_depth_cend() const; | ||
}; | ||
|
||
/// Base class for all expressions. This protects low-level methods in | ||
/// exprt that are not type safe. Depcrecated constructors are removed. | ||
/// This API will eventually replace exprt. | ||
class expr_protectedt : public exprt | ||
{ | ||
protected: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Would it make more sense to use protected inheritance? I assume the answer is no as there remains calls to other methods, that have not been removed, but perhaps given this direction of travel it would making more sense to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would circumvent the need for this class entirely and just update the classes that inherit from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a lot of classes inheriting from |
||
// constructors | ||
expr_protectedt(const irep_idt &_id, const typet &_type) : exprt(_id, _type) | ||
{ | ||
} | ||
|
||
// protect these low-level methods | ||
using exprt::add; | ||
using exprt::make_bool; | ||
using exprt::make_typecast; | ||
using exprt::op0; | ||
using exprt::op1; | ||
using exprt::op2; | ||
using exprt::op3; | ||
using exprt::remove; | ||
}; | ||
|
||
class expr_visitort | ||
{ | ||
public: | ||
|
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.
Typo in
deprecated