-
Notifications
You must be signed in to change notification settings - Fork 444
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
Make the new operator protected for some IR types. #4670
Changes from all commits
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 |
---|---|---|
|
@@ -120,6 +120,7 @@ abstract Type_Base : Type { | |
class Type_Unknown : Type_Base { | ||
#nodbprint | ||
static Type_Unknown get(); | ||
static Type_Unknown get(const Util::SourceInfo &si); | ||
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. Is there ever a case where we have an unknown type with a source info? I can't think of how it could occur. 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. I do not think so. At least we do not store any source info for an unknown type when parsing. I mostly mirrored what the auto-generated constructors allow, so I do not think at can hurt at least. |
||
toString{ return "Unknown type"; } | ||
} | ||
|
||
|
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.
Note that this (and many other places) could just be rewritten as
the default type for constants created via the ctor that just takes an
int
is InfInt. I don't think explicitly including the type adds anything -- its more of an obfuscation than a clarification.