-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C++: Move SsaConsistency to its own file #12583
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
| /** | ||
| * Gets a string that uniquely identifies an `IROpaqueType` tag. This may be different from the usual | ||
| * `toString()` of the tag in order to ensure uniqueness. | ||
| * Gets a string that uniquely identifies an `IROpaqueType` tag. Using `toString` here might | ||
| * not be sufficient to ensure uniqueness, but suffices for our current debugging purposes. | ||
| * To ensure uniqueness `getOpaqueTagIdentityString` from `semmle.code.cpp.Print` could be used, | ||
| * but that comes at the cost of importing all the `Dump` classes defined in that library. | ||
| */ | ||
| string getOpaqueTagIdentityString(Type tag) { | ||
| hasOpaqueType(tag, _) and | ||
| result = getTypeIdentityString(tag) | ||
| result = tag.toString() | ||
| } |
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.
This is probably somewhat dubious. However, this still seems to suffice for our tests (which is the only place where this is used). I tried to factor this out and keep the old definition. Unfortunately this means factoring out all getUniqueId and related predicates, which if non-trivial.
70a3bb0 to
9031348
Compare
| /** DEPRECATED: Alias for SsaConsistency */ | ||
| deprecated module SSAConsistency = SsaConsistency; |
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.
Moving this to SSAConsistency.qll resulted in the following warning:
WARNING: Reference to SSAConsistency references a local library, not the named module.
So I dropped this instead. Note that this was deprecated early September 2022.
This removes the import of the `Print` library in places that are used in production and not just debugging.
MathiasVP
left a comment
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.
LGTM once DCA/CI is happy!
|
DCA looks good. |
This removes the import of the
Printlibrary in places that are used in production and not just debugging.I've only added a change note for C++, as the C# changes live in an experimental directory.