Skip to content
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

FieldAccessLinkerPass: A Base Pass for Field Access -> Member #3979

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

DavidBakerEffendi
Copy link
Collaborator

Given there is a CALL.referencedMember step, it suggests that the schema requires a REF edge between all calls accessing fields to the referenced member node.

This, however, is not the case in general and is neglected to be implemented consistently throughout frontends. The problem is fairly language agnostic, and one can rely on the EVAL_TYPE edge on the base of a field access along with the FIELD_IDENTIFIER to resolve the referenced member.

This pass executes the above, to create a reference edge between a field access and its referencing member.

Resolves #3950

Given there is a `CALL`.referencedMember step, it suggests that the schema requires a REF edge between all calls accessing fields to the referenced member node.

This, however, is not the case in general and is neglected to be implemented consistently throughout frontends. The problem is fairly language agnostic, and one can rely on the `EVAL_TYPE` edge on the base of a field access along with the `FIELD_IDENTIFIER` to resolve the referenced member.

This pass executes the above, to create a reference edge between a field access and its referencing member.

Resolves #3950
@DavidBakerEffendi DavidBakerEffendi added the frontends Relates to the shared x2cpg class label Dec 20, 2023
@DavidBakerEffendi DavidBakerEffendi self-assigned this Dec 20, 2023
@DavidBakerEffendi DavidBakerEffendi merged commit 5010415 into master Dec 20, 2023
5 checks passed
@DavidBakerEffendi DavidBakerEffendi deleted the dave/field-access-linker-pass branch December 20, 2023 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontends Relates to the shared x2cpg class
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] .referencedMember Does Not Work
2 participants