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
Swift: switch to shared, parameterized CFG library #15219
base: main
Are you sure you want to change the base?
Swift: switch to shared, parameterized CFG library #15219
Conversation
swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphParameter.qll
Fixed
Show fixed
Hide fixed
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, but there are some odds and ends to finish:
- needs a change note and autoformat.
- fix for the
CfgConsistencytests (it looks like they're trying toimportan old file). - plus see my two comments
abovebelow. - then a DCA run to check for regressions / build confidence.
| @@ -0,0 +1,69 @@ | |||
| import swift | |||
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.
It would be good to have a comment explaining what this file is. It appears to create the CfgImpl module from the shared codeql.controlflow.Cfg library, via an input signature that is also defined here.
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.
I'm not really happy with the name either. I'm tempted to merge the file with ControlFlowGraphImplSpecific.
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.
I think merging this file with ControlFlowGraphImplSpecific is a great idea!
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 LGTM! I think we should merge the new ControlFlowGraphParameter.qll file into ControlFlowGraphImplSpecific.qll, but otherwise I think the only real thing we need here is a DCA run!
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * The control flow graph library (`codeql.swift.controlflow`) has been transitioned to use the shared implementation from the `codeql/controlflow` qlpack. No result changes are expected due to this change. |
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.
I'm not sure I would have put a change note here (since no users are expected to notice this change), but I guess it doesn't hurt 😄
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.
Ah, that's my fault - I asked for a change note because the check was failing, without thinking about whether should have just added the flag to say that one is not required. I agree it doesn't do any harm.
| @@ -0,0 +1,69 @@ | |||
| import swift | |||
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.
I think merging this file with ControlFlowGraphImplSpecific is a great idea!
| @@ -1,3 +1,252 @@ | |||
| #-----| ... = ... | |||
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.
Awesome! Are these changes all from a9c9170?
No description provided.