Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Inheritance #134

@fabsx00

Description

@fabsx00

The linker creates INHERITS_FROM edges here:
https://github.com/ShiftLeftSecurity/codepropertygraph/blob/10e16ba5d3cd9ed3896c70997fa9f0fd209b6f08/semanticcpg/src/main/scala/io/shiftleft/semanticcpg/passes/linking/linker/Linker.scala#L84

This seems to not work for the fuzzy C frontend.
I created a failing test to highlight the issue:
https://github.com/ShiftLeftSecurity/codepropertygraph/compare/fabs/inher

My guess would be that INHERITS_FROM_TYPE_FULL_NAME is not set on TYPE_DECL nodes. You can look into java2cpg to see how it's done:

https://github.com/ShiftLeftSecurity/java2cpg/blob/3bdf268a2c0840e09ae27ea3b6f7011bfb75cada/java2cpg/src/main/java/io/shiftleft/java2cpg/domainlogic/structure/IClassStub.java#L66

Please also add a corresponding test in fuzzyc2cpg.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions