-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rust: Include self
parameters in the CFG
#18041
Conversation
i = 0 and | ||
result = this.getParamList().getSelfParam() | ||
or | ||
result = this.getParamList().getParam(i - this.getNumberOfSelfParams()) |
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.
The indices of getChildNode
need not be consecutive, nor start from 0, so I would just do result = this.getParamList().getParam(i - 1)
or | ||
i = this.getParamList().getNumberOfParams() and | ||
i = this.getParamList().getNumberOfParams() + this.getNumberOfSelfParams() and |
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.
And here it would then be i = this.getParamList().getNumberOfParams() + 1
.
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. Please do a DCA run before merging ;-)
DCA looks fine I think. There seems to be an extraction error for googleapis-tonic, but that must be unrelated. |
Currently
self
parameters are not included in the CFG. This PR adds them.This example:
results in this CFG (previously the 2nd and 3rd node where not there):